Select multiple issues on scrum backlog and sum story points?

NathanG
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 29, 2015

I have users reporting to me that they used to be able to do the following:

When looking at the backlog on a scrum board, they could ctrl + click multiple stories/issues and see the total number of story points of all the selected issues.

I've tried doing this in JIRA Agile... I can ctrl + click multiple issues, but I don't see any indicator or sum showing the total story points for selected issues.

Was this a feature that previously worked in JIRA Agile but has been removed?

(I know we can drag and drop the sprint indicator line up and down... but my users specifically said they could select a few stories and see the sum of story points).

Thank you~!

 

2 answers

1 accepted

0 votes
Answer accepted
NathanG
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 7, 2016

So, I can't find anything that does this, so I wrote my own.

 

Take this jQuery:

var sum = 0
var divcount = 0
$(".ghx-selected").each(function() {
    
    //for each div with ghx-selected as a class, find all spans with "Story Points" as the title
    $(this).find("span").each(function(){
        var spanTitle = $(this).attr("title")
        var spanText = $(this).text()
        if(spanTitle == "Story Points"){
            divcount += 1
            if(!isNaN(spanText) && spanText.length!=0) {
                var spanValue = parseFloat(spanText)
                if (!isNaN(spanValue)){
                    //alert("Sum is " + sum +"\nspanValue is " + spanValue)
                    sum += spanValue;
                    
                }
            }
        }
    });  
});
alert("Selected Stories: " + divcount + "\n" + "Story Point Sum: " + sum)

 

Use this bookmarklet creator:

http://bookmarklets.org/maker/

Choose:

  1. URL-encoded reserved characters
  2. Isolate within an unnamed function
  3. Make sure jQuery 1.7 or higher is available

 

Get the bookmarklet code:

 

javascript:void%20function($){var%20loadBookmarklet=function($){var%20sum=0,divcount=0;$(%22.ghx-selected%22).each(function(){$(this).find(%22span%22).each(function(){var%20spanTitle=$(this).attr(%22title%22),spanText=$(this).text();if(%22Story%20Points%22==spanTitle%26%26(divcount+=1,!isNaN(spanText)%26%260!=spanText.length)){var%20spanValue=parseFloat(spanText);isNaN(spanValue)||(sum+=spanValue)}})}),alert(%22Selected%20Stories:%20%22+divcount+%22\nStory%20Point%20Sum:%20%22+sum)},hasJQuery=$%26%26$.fn%26%26parseFloat($.fn.jquery)%3E=1.7;if(hasJQuery)loadBookmarklet($);else{var%20s=document.createElement(%22script%22);s.src=%22//ajax.googleapis.com/ajax/libs/jquery/1/jquery.js%22,s.onload=s.onreadystatechange=function(){var%20state=this.readyState;state%26%26%22loaded%22!==state%26%26%22complete%22!==state||loadBookmarklet(jQuery.noConflict())}}document.getElementsByTagName(%22head%22)[0].appendChild(s)}(window.jQuery);

 

Create your bookmark and use it

The following picture shows 4 stories selected and the sum of the story points in a popup:

sum_story_points.png

 

 

aurelien duval November 10, 2016

That's great! I've been looking for this feature in vain, thanks!

It would be nice if Atlassian added the story point count in JIRA though

 

Deleted user May 10, 2018

cool  works but I get a error after closing in chrome:

  • “Exception: Uncaught TypeError: Failed to execute 'appendChild' on 'Node': parameter 1 is not of type 'Node'…..”
Like Jeremiah Mullane likes this
0 votes
Juergen Lanner January 27, 2020
Tried it on Jira 8.4.1 and it needed some adaption due to changed page source code: find("span") ==> find("aui-badge")
var sum = 0
var divcount = 0
$(".ghx-selected").each(function() {

//for each div with ghx-selected as a class, find all spans with "Story Points" as the title
$(this).find("aui-badge").each(function(){
var spanTitle = $(this).attr("title")
var spanText = $(this).text()
if(spanTitle == "Story Points"){
divcount += 1
if(!isNaN(spanText) && spanText.length!=0) {
var spanValue = parseFloat(spanText)
if (!isNaN(spanValue)){
//alert("Sum is " + sum +"\nspanValue is " + spanValue)
sum += spanValue
}
}
}
})
})
alert("Selected Stories: " + divcount + "\n" + "Story Point Sum: " + sum)
Jeremiah Mullane September 3, 2020

Works for me! I do still get the error popup afterwards, though closing an error banner is not a huge inconvenience.

“Exception: Uncaught TypeError: Failed to execute 'appendChild' on 'Node': parameter 1 is not of type 'Node'…..”

Suggest an answer

Log in or Sign up to answer