Created
May 9, 2017 09:10
-
-
Save tpatel/04dea819f3a9a5ffaa53c01ae91c07bd to your computer and use it in GitHub Desktop.
This file contains hidden or 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
var elems = [].slice.call(document.querySelectorAll('.js-issue.ghx-selected')); | |
var total = 0; | |
var count = 0; | |
elems.forEach(function(elem) { | |
var points = parseFloat(elem.querySelector('*[title="Story Points"]').innerText); | |
total += points; | |
count++; | |
}) | |
alert(total + ' points\n' + count + ' tickets'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here is a link to add this as a bookmarklet:
http://tpatel.github.io/bookmarklets/#var%20elems%20%3D%20%5B%5D.slice.call(document.querySelectorAll(%27.js-issue.ghx-selected%27))%3B%0Avar%20total%20%3D%200%3B%0Avar%20count%20%3D%200%3B%0Aelems.forEach(function(elem)%20%7B%0A%09var%20points%20%3D%20parseFloat(elem.querySelector(%27*%5Btitle%3D%22Story%20Points%22%5D%27).innerText)%3B%0A%09total%20%2B%3D%20points%3B%0A%09count%2B%2B%3B%0A%7D)%0Aalert(total%20%2B%20%27%20points%5Cn%27%20%2B%20count%20%2B%20%27%20tickets%27)%3B