Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Select multiple issues on scrum backlog and sum story points?

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

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

 

 

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

 

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
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)

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
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you