Skip to content

Instantly share code, notes, and snippets.

@AurelienLoyer
Last active November 23, 2020 15:22
Show Gist options
  • Save AurelienLoyer/31722322fe5b9fe6837274120d1cdacb to your computer and use it in GitHub Desktop.
Save AurelienLoyer/31722322fe5b9fe6837274120d1cdacb to your computer and use it in GitHub Desktop.
JIRA - Total of technical tasks
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