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

Sum up Story points to epic

Elad Ben-Noam May 26, 2020

Hi,

I have many customers that are looking to sum up Story points and other custom number fields from stories to their epics.

Waiting for this feature to be deployed: https://codebarrel.atlassian.net/browse/AUT-476

The current status is "deployed to cloud" - is it available for use on Jira cloud? what's the chosen code for that?

Thanks,

Elad.

12 answers

16 votes
Carlos Treminio February 18, 2021

This rule works on my case and it may help you.

Overview

00.png

 

 

Trigger

01.png

 

Sum the Story Points

03.png

 

Edit the Epic Story Points 

04.png

Append the comment

05.png

Katherine Japutra February 25, 2021

This works for me. Thank you. 

One question though. How to apply this to more then 1 epic?

Sebastian George April 6, 2021

The way Carlos has this set up is it works for any epic within the given project you're working with and keys off of as soon as a story point value has been updated that has an epic link.

 

Well done Carlos, thank you for figuring out this functionality. 

Like Carlos Treminio likes this
SrikanthNarayan June 16, 2021

 @Carlos - Thank you for the screenshots, however i get an error when I use the syntax for Epic link. Any thoughts, please. 

Andreza Santos November 19, 2021

@Carlos Treminio 

Hi!

For me this solution unfortunately did not work, the automation even runs successfully, but even if the stories are with values ​​greater than 0, the automation is always 0 in the epic, it doesn't work.

Can you help me?

 

Captura de Tela 2021-11-19 às 11.38.52.pngCaptura de Tela 2021-11-19 às 11.39.03.pngCaptura de Tela 2021-11-19 às 11.39.26.png

Like Christine Lee likes this
Christine Lee January 23, 2022

@Andreza Santostry using "Parent" instead of "Epic Link" in the Lookup Issues component. I had the same zero sum problem, and this change worked for me.

Like # people like this
Ian Davies February 2, 2022

@Carlos Treminio your suggestion works a treat.  Was struggling to get this working so thank you for the assist

Vasanth kumar June 14, 2023

@Carlos Treminio  Thank you for you effort. I followed the same instruction but Epic story point just changed from None to Zero when I changed the one of the story's point.

The automation status is success but  Its not summing up the point from stories to Epic. 

Can you help with this. Thank you.  

Automation screen shot.png

Guy Anela June 14, 2023

Hi @Vasanth kumar -Try changing the JQL in your Lookup issues Action to...

"Epic Link"={{issue.key}}

 

There are other scenarios to be considered as well which I've commented on below. Hope they help. Cheers!

6 votes
Guy Anela March 31, 2022

Hi folks - I implemented Carlos' solution and it works like a charm! Thanks Carlos! :) 

Having said that, I ran into a couple of scenarios where the Story Point totals get misaligned...

  1. If you simply remove a Story from an Epic.
  2. Or, if you change the Epic Link field on an existing Story that already has the Story Point set. Whether you're setting the Epic Link for the first time, assigning it to another Epic, or simply removing it.

In each of the above cases, the Story Point totals do not get updated on the Epic(s).  

So, to address these use cases, I created an additional Automation that gets triggered when a Story is updated. It checks to see if the Epic Link was changed, captures the changed To/From values and recalculates the Story Point totals accordingly. 

Here are the Automation settings I used...

  • Trigger: Issue Updated
  • Field Condition: Type=Story
  • Field Condition: Story Points is not empty
  • Advanced Compare Condition: If {{changelog.Epic Link}} does not equal Empty
  • Create Variable Action
    • Name: EpicLinkChangedTo
    • SmartValue: {{changelog.Epic Link.toString}}
  • Create Variable Action
    • Name: EpicLinkChangedFrom
    • SmartValue: {{changelog.Epic Link.fromString}}
  • If/Then Condition: If {{EpicLinkChangedTo}} does not equal empty
    • Branch Rule / Related issues:
      • Type: JQL
      • JQL: Key={{EpicLinkChangedTo}} 
    • Lookup Issues Action:
      • JQL: "Epic Link"={{EpicLinkChangedTo}}
    • Edit Issue Action:
      • Story Points: {{lookupIssues.Story Points.sum}}
    • Add Comment Action
      • {panel:bgColor=#e3fcef}
        *{{initiator.displayName}}* has updated the *Epic Link* on {{triggerIssue.key}} so the total Story Points on this Epic has been adjusted to *{{lookupIssues.Story Points.sum}}*.
        {panel}
  • If/Then Condition: If {{EpicLinkChangedFrom}} does not equal empty
    • Branch Rule / Related issues:
      • Type: JQL
      • JQL: Key={{EpicLinkChangedFrom}} 
    • Lookup Issues Action:
      • JQL: "Epic Link"={{EpicLinkChangedFrom}}
    • Edit Issue Action:
      • Story Points: {{lookupIssues.Story Points.sum}}
    • Add Comment Action
      • {panel:bgColor=#e3fcef}
        *{{initiator.displayName}}* has updated the *Epic Link* on {{triggerIssue.key}} so the total Story Points on this Epic has been adjusted to *{{lookupIssues.Story Points.sum}}*.
        {panel}

I hope this helps!!!  ...Cheers! :)

Didi Goldbart April 18, 2022

@Guy Anela 

Thank you very much for this detailed automation.

One question though: when I create the Branch Rule inside the "If/Then" block, it opens a new nested branch ("For JQL"). Should the following statements be inside that nested branch?

 image.png

Guy Anela April 18, 2022

Hi @Didi Goldbart - Yes, that is correct. ...you'll have two separate IF blocks, one for the EpicLinkChangedTo (just as you depicted above), and another for the EpicLinkChangedFrom. Here's a screenshot of the entire Automation Rule...

AutomationRule-SumPointsWhenEpicLinkChanges.png

 

Also, I ended up adding a 3rd Automation to handle the use case where a child ticket gets Deleted. Here's a screenshot of that Automation Rule as well...

AutomationRule-SumPointsWhenIssueDeleted.png

I hope these help. Cheers!

Like # people like this
Didi Goldbart April 18, 2022

@Guy Anela  - This is very helpful, thank you very much (great catch adding the deleted child rule)!

I'm having some issues with the 2nd automation, its seems that an error occurred. I went over the definitions and they seems correct. Do you have any idea how do I inspect those errors? I couldn't find a log or other entry with the error details.

Guy Anela April 18, 2022

Hi @Didi Goldbart - Glad it was helpful.

As far as the error, you should be able to track things down by viewing the Audit log. You can expand the Show more information for the specific execution and see the Conditions that were met and the Actions that were taken...

AutomationRule-AuditLog.png

Like Didi Goldbart likes this
Nour Durra July 10, 2022

Hi @Guy Anela 

 

Thanks a lot for this, it's awesome.

I am getting an error that I am unable to debug, although the automation is doing what it should

Screenshot 2022-07-10 at 23.14.23.png

 

and this is my automation, am I missing anything here? thanks a lot

screencapture-forbesmedia-atlassian-net-jira-software-c-projects-JT-settings-automate-2022-07-10-23_21_18.png

Guy Anela July 18, 2022

Hey @Nour Durra - You're more than welcome! :)

As far as the error, which For JQL Branch is it failing in? There are two, one for the EpicLinkChangedFrom and the other for EpicLinkChangedTo. I would suggest adding some Logging Actions to log the variable values getting passed before and after it enters the loop. Like this...

AutomationExample.png

Hopefully the logging will give you some clues.

Katja Arendt August 1, 2022

@Nour Durra 

Have you found a solution to your problem. I also tried the second Automation Rule and get the same error as you.

David Hartman October 4, 2022

I'm also having the same issue. It seems like the comparison of {{changelog.Epic Link}} does not equal Empty is not working as expected

David Hartman October 4, 2022

I only get this error when I remove an Epic Link from a ticket

David Hartman October 4, 2022

Ah figured it out. Silly mistake. When you are comparing the value of {{changelog.Epic Link}} you don't actually type "Empty" you just leave the field empty

Like Cornelia Jeppsson likes this
Dick February 1, 2024

@Guy Anela 
For me, the {{changelog.Epic Link.fromString}} is not filled with the preceding epic link. It prevents me to do calculations for the original epic (prior to changing the issue's epic link). 

As Atlassian is busy with changes regarding the parent / parent link / epic link, I've tried multiple ways to get this going (see below). Sadly to no avail yet (all return null) 

{{changelog.Epic Link.fromString}}

{{changelog.parent.fromString}}

{{changelog.parent link.fromString}}

{{#changelog.Epic Link}}{{fromString}}{{/}}

{{#changelog.parent}}{{fromString}}{{/}}

{{#changelog.parent link}}{{fromString}}{{/}}

 

Am I doing something wrong, is there a new syntax ?

 

Ben Buck April 23, 2024

I just found this handy article https://confluence.atlassian.com/jirakb/automation-smart-value-to-fetch-the-current-and-the-last-changed-parent-key-1369637055.html which explains how to get the new and previous parent 

To: {{changelog.IssueParentAssociation.toString}} 

From: {{changelog.IssueParentAssociation.fromString}}

2 votes
Lauren Pennisi May 27, 2020

In the meantime, you can see total number of story points on an epic by following these steps:

  1. From your board, click Backlog.
  2. Click Epics panel.
  3. Click on an epic. You will see total story points for all tickets in the selected epic that are in the same Jira project as the epic. Any ticket with a different issue key will not be included in the total. In the example (screenshot) MGRMODS-208 has 9 issues but only 4 are also MGRMODS issues and those tickets total 26 story points.

Epic total points.png

Ashish Jere February 22, 2021

John McKiernan Can you please confirm the above is the right way to get the total story points on an epic?

Leslie Timm November 18, 2021

I don't see this view anymore either :(

Like Deleted user likes this
Lauren Pennisi January 1, 2024

Looks like this is the new paid feature:  https://epicsumup.com/

1 vote
Guy Anela April 6, 2023

Hi All - In regards to summing up Story Points for an Epic, a few teams just reported to me that the Story Points are being double counted on the Release Burndown Report now (once for the Stories and again for the summed up value on the Epic). 

Have any of you come across this? If so, how are you handling it? 

Guy Anela June 7, 2023

Just a heads up, we addressed this by removing the Fix Version values from the Epics. It's not critical for our teams to track the Fix Version at the Epic level as long as its tracked on the child issues (Stories, Bugs, Tasks, etc.).

Once the Fix Version values were removed from the Epics, the Release Burndown Report calculated the Story Points correctly. 

1 vote
John McKiernan
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 26, 2020

Hi @Elad Ben-Noam ,

Thanks for your message. John from the automation team here. 

This new feature has indeed shipped last week. We are just putting a blog together right now to inform customers. 

We will also be running through this new feature in a webinar on June 11th: https://www.atlassian.com/webinars/software/how-to-supercharge-your-automation-in-jira-cloud 

Below is the smart value you could use. However, keep in mind that at the moment it will only work for summing up subtasks to the parent rather than stories to the Epic. 

2156cf3c-f624-42ab-b451-a4fc87777e9c.pngHope that helps but any questions, just let me know.

John 

Sebastian Nordin May 27, 2020

That is great! @John McKiernan when is it planned to add support for summing up values from stories on epic level?

Like edwardotis likes this
John McKiernan
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 27, 2020

Glad it solves a problem @Sebastian Nordin !

I haven't got a date for this just yet but will make sure to update this page once that ships :) 

Like Sebastian Nordin likes this
Sameer P October 14, 2020

Hi John  - Any updates on when JIRA will support summing up values from stories/tasks/sub-tasks on epic level?

Like # people like this
John McKiernan
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 14, 2020

I'm afraid not @Sameer P though if you check out the comments on this post from the engineer who built it, you might find a workaround: https://community.atlassian.com/t5/Automation-articles/How-to-sum-up-logged-hours-using-automation-in-Jira-Cloud/ba-p/1409115

edwardotis March 30, 2022

@John McKiernan Can you please give a 2022 update on this feature? I tried your smart sum on a simple parent/child task relationship and it fails with the error: is not a number

Peter Kerrigan March 31, 2022

@edwardotis are you looking for the feature that will sum up from stories to epics? 

0 votes
Dave Forsyth
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!
December 6, 2023

JIRA has a template for Parent (FKA Epic) story point updating. You can start with this and make whatever updates you want to it. I found it helpful with the new paradigm where Parent is replacing Epic, Epic Link, and Parent Link. 

It still needs to be copied and adjusted to handle updating the former Parent when a Parent is changed. 
image.png

0 votes
Andrii Chaika September 20, 2023

There is a plugin which shows total story points and total time estimate for epic https://marketplace.atlassian.com/apps/1231982/epic-insights-issue-view-for-jira?tab=overview&hosting=cloud 

0 votes
Dawn Rodney June 16, 2023

@Guy Anela I had a few questions about your If/Then statement. When I attempted the If: matches, do I want to Run actions if... All conditions match or At least one condition matches

Screen Shot on 2023-06-16 at 12-39-39.png

 

And my second question, when I tried to just copy the If: matches {{EpicLinkChangedTo}} to create the If: matches {{EpicLinkChangedFrom}}, the automation created a Else-if: matches instead of just an If: match. I tried editing it and looking for other options for If but didn't see any other options.

Any ideas on what I did incorrectly? Here is the part of the automation.

Screen Shot on 2023-06-16 at 12-40-38.png

 

Here is my complete rule

Screen Shot on 2023-06-16 at 12-45-01.png

Guy Anela June 16, 2023

Hi @Dawn Rodney - In regards to your first question, there's only 1 Condition in that IF block so it shouldn't matter. :) I would just leave it set to "All conditions match". Now, if you later decide to add additional Conditions, then you would want to choose the appropriate one.

 

In regards to your second question, I would manually add the IF Condition instead of copying the original one. You would just click on the New Component at this level...

Image1.png

If you still have the Else-if there, you should be able to drag/drop its internal components into the new If. Once you're done moving them, you can delete the Else-if.

 

I hope this helps. :)

Dawn Rodney June 20, 2023

@Guy Anela Yes, thank you. That was super helpful. I wasn't able to "move" it but I just deleted it and add a new component. It is really odd, that I can't copy it and then edit it. Oh the fun quirks of Jira administration... ;-) 

I do have edge case that I am in the process of testing. Wondering if anyone ran into this one too.

If I update the Epic Link field in a ticket (that is currently in an Epic) and just update the field by selecting a new Epic in the drop-down. I DON'T actually clear the Epic Field before adding the additional Epic, it then fails. I assume that Jira does not seem to log that the Epic Field is not empty??? :shrug: Any ideas?

 

Annotation-Annotation on 2023-06-20 at 15-33-35.png.png

0 votes
Peter Kerrigan March 21, 2022

I am just implementing something like this for my client. The original automation outlined by @Carlos Treminio worked perfectly for me!

I added one additional condition though as my client wanted to exclude any issues that are in the "Done" status category. Thought I'd share in case others are interested in the same use case.

In order to achieve this I:

  1. Added the "Status" field to the automation trigger to monitor it for changes
  2. Updated the "Then: Lookup issues" JQL to be "Epic Link" = {{issue.key}} and statusCategory != Done

This will monitor the Status of issues and exclude the story points of those issues that are closed.

0 votes
bmacd December 14, 2021

I followed this video and the automation kicked in but for some reason it makes the story points in the Epic 20 points regardless of how many points I put in the tasks. Any ideas?

bmacd December 14, 2021

In the Epic I get 20 points, so I went through the issues and added silly points like 88 and 23 and I get the correct number in the 'estimate' field but not in the Story Point field. 

 

story points 20.pngstory points 207.png

0 votes
Rahul_RVS_Support
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
April 6, 2021

removed - posted mistakenly

0 votes
Alex Fairweather June 29, 2020

Epic status by Story Points report in Jira that can also be displayed in Confluence

  • I can solve this in Jira Server edition.  But you need to have deployed Dataplane reporting plugin
  • See bottom of this link with "Alex Fairweather" reply and configuration instructions

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events