Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
workflowy story points calc - minimized version
javascript:(function(){var allTagText=jQuery('.contentTagText:contains("SP")').text();var doneTagText=jQuery('.done .contentTagText:contains("SP")').text();var numberPattern=/\d+/g;var allSprintStoryPoints=allTagText.match(numberPattern);var allCount=0;var doneCount=0;for(var i=0;i<allSprintStoryPoints.length;i++){allCount+=parseInt(allSprintStoryPoints[i])};var doneSprintStoryPoints=doneTagText.match(numberPattern);if(doneTagText.length>0){for(var i=0;i<doneSprintStoryPoints.length;i++){doneCount+=parseInt(doneSprintStoryPoints[i])}}else{doneCount=0}alert('Total: '+allCount+' '+' Pending: '+(parseInt(allCount)-parseInt(doneCount))+' Complete: '+doneCount)}());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.