Last active
November 23, 2020 15:22
-
-
Save AurelienLoyer/31722322fe5b9fe6837274120d1cdacb to your computer and use it in GitHub Desktop.
JIRA - Total of technical tasks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let total = 0; | |
Array.from( | |
document.getElementsByClassName('ghx-backlog-container ghx-everything-else')[0].getElementsByClassName('aui-badge ghx-statistic-badge') | |
).forEach(item => { | |
let content = item.textContent; | |
if(content === '-') { | |
return; | |
} else if(content.endsWith('d')) { | |
total += parseInt(content.replace('d', '')); | |
} else if(content.endsWith('w')) { | |
total += 7 * parseInt(content.replace('w', '')); | |
} | |
}); | |
console.log(`🧮 Total of technical tasks: ${total} days`); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment