Epic Story Point Sum Up (count Story Points in an Epic)

Paul Cooper
Contributor
April 16, 2021

My goodness Automation has some quirks.

8 hours of head scratching later here is how to sum story points at Epic level after user update.

First, create a Custom Field.

System administration -> Issues -> Custom Field -> Number Field.

I called mine "Story Points Sum for Epic"

Second, create an automation that triggers when a 'Story Point' field is changed.

15d92603-3123-4959-9d4a-dabbf2344676.png
Step 1

9fa02b74-2286-4489-b1a8-20b1457bc488.png

Step 28ca436a1-4be5-41ad-b661-2fbc912fad69.png

Step 3

55118152-9c42-4f2d-a77d-98cb64362cc6.png

Step 4

7f750397-2565-4722-96c0-b63d271188c4.png

Test the Automation by changing a Story Point somewhere and check log6f34f73c-81cb-40c8-a262-3f33ea9b8035.png

 

4 comments

Comment

Log in or Sign up to comment
Bill Sheboy
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.
April 16, 2021

Hi @Paul Cooper 

Thanks for the nice step by step write up!  Two suggested improvements:

  • If you always need the epic total to be numeric, and it is possible for the stories to all have no story points, consider adding a default value to the sum: {{lookupIssues.Story Points.sum|0}}
  • This rule works for Company-managed (formerly called Classic) projects.  When doing this for Team-managed (formerly called Next-Gen), the Story Point Estimate field would be used rather than the Story Points one.

Best regards,

Bill

Paul Cooper
Contributor
April 18, 2021

Thanks Bill, I will look at these suggestions and see if they improve what we are doing.


A new thing: I do need to fix the Story Points Sum for Epic field to be locked. I noticed that the field can be manually overwritten. Of course it corrects as soon as a story points in dependents update.

Bill Sheboy
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.
April 19, 2021

Paul, we have the same issue with our automation-based cycle time fields.  We address that by detecting if any of the calculated fields in the parent are edited manually, we trigger the recalc.

Maria Kazakou {Appfire} April 20, 2021

Hi @Paul Cooper and @Bill Sheboy ,

Did you know that JSU Automation Suite for Jira Workflows provides Calculated Fields capabilities on Jira Cloud?

By setting up a simple formula, you can have a field calculated for your Epic based on field values in the stories under your Epic (eg. sum of Story Points). Whenever the value of the field under your stories changes, the calculated field will be updated automatically. Plus, calculated fields are created as read-only fields.

I'm currently looking for Jira Cloud users to join my usability study for Calculated Fields and I'd be happy to schedule a call to get your feedback on our solution. If you would be interested, please DM me on LinkedIn.

Best,
Maria Kazakou
Product Manager at Beecom Products (an Appfire company)

Dave Coop November 8, 2024

Thanks @Paul Cooper for the write up and @Bill Sheboy for the extra commentary. While this solution works well for Epics that have less than 100 tickets under it, I have a couple of scenarios where we have large epics with +100 tickets and then the calc stops short. Any suggested solution for this?

Bill Sheboy
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.
November 9, 2024

Hi @Dave Coop 

First thing, as this is a very old thread, I recommend creating a new question and perhaps adding a link to this one.  That will ensure the maximum number of people see it to offer suggestions.

Back to your question...for an undefined number of issues to sum, that cannot be done with built-in features. 

 

If you knew there would be between 0 and N issues (e.g., 350 issues) your rule could perform this type of summation in chunks.  To do this, you could:

  • Use a call to the REST API endpoint for issue search with JQL, using the Send Web Request action.  That will return up to 100 issues and the count of total issues matching.
  • Capture the sum from the first call to the endpoint
  • Repeat the above two steps, based on your foreknowledge of the maximum possible issue count in the Epic
  • Sum the results of the different calls

Based upon maximum rule length, this approach would work for up to 2000 issues in a single epic.

Also, this would be a very slow rule (if there are many issues), and could lead to service limits problems, shutting down executions of other rules.

 

Two other approaches are to build your own app / service to perform the sum outside of Jira, and then call that from the rule; or to investigate marketplace apps for calculated fields which are not limited to the 100 issue count.

 

Kind regards,
Bill

Like Dave Coop likes this
Dave Coop November 11, 2024

Thank you @Bill Sheboy 

TAGS
AUG Leaders

Atlassian Community Events