Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Count Number of User Stories (bookmarklet)

Mike Singleton October 26, 2020

I'm rather new to this, why isn't this working? 

javascript:var sum = 0; jQuery('.aui-badge[title="Story"]').each(function() {sum += parseInt(jQuery(this).text())}); alert('User Stories: ' + sum); void(document.close());

2 answers

0 votes
Esther Strom
Community Champion
October 29, 2020

@Mike Singleton I think I get what you're trying to do. Where are you in Jira when you're running this bookmarklet? In a scrum board's backlog view? Or somewhere else?

0 votes
nina_schmidt
Community Champion
October 26, 2020

Welcome @Mike Singleton 

would you please add a bit more information?

where are you entering that java code? 

Mike Singleton October 26, 2020

I am tring to count the number of User Stories (and only those) in the backlog. I tried a JQL, but it's not perfect so I am trying a bookmarklet

project = ACME AND issuetype = Story AND resolution = Unresolved AND (Sprint = EMPTY OR Sprint not in (openSprints(), futureSprints(),closedSprints()))

nina_schmidt
Community Champion
October 29, 2020

sorry for the late answer. 

your jql looks good, what is the result of this filter shown in your environment tho? 

Mike Singleton October 29, 2020

..

Mike Singleton October 29, 2020

backlog.pngIt works, but I was hoping for something quicker than a gadget

nina_schmidt
Community Champion
October 29, 2020

Ok, understood. I‘ll try to loop in a Java specialist 

Suggest an answer

Log in or Sign up to answer