Sum up original estimates from stories to Epic
Asked by Nicole_Selph:

I have searched the community threads on this issue, but it seems that the problem that I am facing has not been answered to my specific situation, so starting a new question.

I am trying to set up an automation that will sum up the original estimate of **stories** to their linked **Epic** (Parent). I have set up the rule, and it notes that when run, it is a success, but no changes are apparent. Not sure what I am doing wrong here; I may be going crazy!

Here is my rule

![Sum of Original Estimate.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/325086i5D2C52C57A4265FF/image-size/large?v=v2&px=999 "Sum of Original Estimate.PNG")

Hoping the community can help me figure out the issue, as I am sure its something small that I am overlooking.

Note: our original estimate is set to hours so using the divide by 3600


Answers:
author: Kalyan Sattaluri
body: Hello [@Nicole_Selph](/t5/user/viewprofilepage/user-id/5501577)

Are you trying to Sum up estimates from Story to Epic?

If so, your current rule is trying to add subtask values to Epic. Which is not correct and nothing will be updated.

To correct this, inside your branch, first thing you need to do is lookupIssues with "Parent" = {{issue.key}}

Then your total is, {{lookupIssues.remaining estimate.sum}}

And you can assign it to your epic as {{#=}}{{lookupIssues.remaining estimate.sum}} / 3600 {{/}}

comments: author: Nicole_Selph
body: Hi [@Kalyan Sattaluri](/t5/user/viewprofilepage/user-id/5312306)

Thank you so much for responding! Pardon my ignorance though, I am not sure where to go to do the lookup issues, so not sure where to correct my rule. This is my first time creating rules, so I am not great at understanding the complexities yet.

Apologies, if my question is silly


author: Kalyan Sattaluri
body: Hi [@Nicole_Selph](/t5/user/viewprofilepage/user-id/5501577)

After your Branch statement, delete existing Edit issue step, and below:

* Add Component -\> Then: Add an action -\> Select "Lookup Issues"-\> Give JQL =\> "Parent" = {{issue.key}}
* Then Add Component -\> Then: Add an action -\> Select "Log Action"-\> Enter =\> {{lookupIssues.remaining estimate.sum}}
* Finally, Edit Issue -\> Choose "Total Effort" and give below as value:

{{#=}}{{lookupIssues.remaining estimate.sum}} / 3600 {{/}}


author: Kalyan Sattaluri
body: Should be like below, run rule and share audit log..

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/325142i2EC84173A01B0E40/image-size/large?v=v2&px=999 "image.png")


author: Nicole_Selph
body: [@Kalyan Sattaluri](/t5/user/viewprofilepage/user-id/5312306)

Thank you so much it worked!


author: Theresa
body: Can you use this when you are time tracking and not using story points?


author: Nicole_Selph
body: [@Theresa](/t5/user/viewprofilepage/user-id/5517412) yes, it should. We are not using story points, just time tracking. This is what my rule looks like

![Epic sum of stories.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/333376i7B5FCAA0FD3CEDED/image-size/large?v=v2&px=999 "Epic sum of stories.PNG")


author: Mehmet A _Bloompeak_
body: Thanks to [@Kalyan Sattaluri](/t5/user/viewprofilepage/user-id/5312306) for detailed explanation of the automation rule.

[@Nicole_Selph](/t5/user/viewprofilepage/user-id/5501577), as an alternative to automation you can use [Sum Up Reports for Jira](https://marketplace.atlassian.com/apps/1231321/sum-up-reports-for-jira?hosting=cloud&tab=overview) app developed by our team. It provides a dashboard gadget and you can view multiple fields summed at the same time. The app does not modify your epic fields. Instead it displays the results on the fly in your dashboard.  

![sum of remaining estimate by epic.png](https://community.atlassian.com/t5/image/serverpage/image-id/325177iF9515A6B0084FB74/image-size/large?v=v2&px=999 "sum of remaining estimate by epic.png")

Hope it helps.