How to sum Story Points in list of issues with Automation for JIRA?

ccaprio
Contributor
September 19, 2019

I need to sum the story points in a list of issues on the send email action within automation for jira. Some of the issues will have 0 story points and some will have many. 

I have tried {{issues.size}} and {{issues.story points.size}} but they get the number of issues and number of issues with non 0 story points rather than adding the number of story points.

2 answers

1 accepted

1 vote
Answer accepted
ccaprio
Contributor
September 19, 2019

Found my own answer, for those in the future:

{{#=}}{{issues.Story Points.join(" + ")}}{{/}}

 

The {{issues.Story Points.join(" + ")}} gets all of the story points and puts them in an equation like this: 1.0 + 1.0 + 1.0 + 2.0 + 2.0 + 3.0 + 1.0 + 3.0

 

Then the {{#=}} ....... {{/}} does the math on that equation to print out 14 in the end.

Thanks internet!

Ryan Randell
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 8, 2020

Hey @ccaprio Are you able to share your automation for Jira setup where you used this logic? I have a similar use-case and I'm having trouble applying your answer in my project.  Thx

ccaprio
Contributor
April 9, 2020

I actually dont have access to that JIRA anymore but it ran a branch using jql to get a list of issues and then had this logic in the action tag after it. You also had to make sure the checkbox for handle all issues at once or something similar to that in the branch section is checked. Hope you figure out your problem!

0 votes
Eric Rinaldo
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 16, 2020

Nowadays you can simply: {{issues.Story Points.sum}}

 

Documentation: Smart values - lists - list.sum

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events