Automation - I am looking for a way to sum Story points for particular epic

Piotr Gilert March 25, 2021

I was trying to follow tutorial presented here:

https://www.atlassian.com/software/jira/automation-template-library/sum-up-story-points

 

However this fails for me. I suspect that relation between Epic and Story is not a subtask in:

{{issue.subtasks.Story Points.sum}}

Above prints 0 as if  there were no child under Epic.

 

When I try to apply rule for relation of Story - Sub-task it works all good. 

 

However for Epic - Stories it does not work. Can you please help me on how to automate update of Epic total Story points when SP value of child Story is edited?

2 answers

0 votes
Fabian Lim
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 31, 2021

@Piotr Gilert: You can find a video tutorial here that is similar to what Bill has shared earlier. It provides you with various rules to keep the story points under an Epic in sync.  

Link: https://youtu.be/PROcxEOMyGM 

Thanks.  

0 votes
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 25, 2021

Hello @Piotr Gilert 

Try this instead

Screen Shot 2021-03-25 at 8.48.37 AM.png

The code they have for the final Edit is also not right for summing story points to the parent epic, so you'll have to work out the change for that also. Let us know if you need help with that.

Piotr Gilert March 25, 2021

Thanks for your answer. This is exactly where I'm stuck.

I am not able to proceed on the level of

"Then: Edit issue fields"

 as the formula {{issue.subtasks.Story Points.sum}} does not work. 

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.
March 25, 2021

Hi @Piotr Gilert 

One thing to consider is when you want to sum the story points for the children of the epic.  What problem are you trying to solve, as that may influence the "when"?

If you always want the epic to always contain the total from the stories, regardless of when they are changed or which ones are sized, you could do this to replace the epic's field value:

  • Trigger: field change for Story Points
  • Condition: issue type is Story
  • Branch: for epic (parent)
    • Action: lookup issues on JQL "Epic Link" = {{issue.key}}
    • Action: edit the epic story points field with
{{#=}}{{lookupIssues.Story Points.sum}} + {{triggerIssue.Story Points|0}}{{/}}

Note in a rule triggered by an issue, I believe any JQL excludes the triggering issue, which is why you add that value to the results of the Lookup Issues.  Please check my work if that is incorrect.

 

Best regards,

Bill

Jouni Riimala January 19, 2024

Hi,

Good guidance, but for me I needed to change Lookup a bit and formula a bit to make summarizing work.

Now this flow requires that one assign epic manually to the story so if this could be automated via linkage etc that would be good. Any guidance would be appreciated.


SummingStoryEstimations.JPG 


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.
January 20, 2024

Hi @Jouni Riimala 

As this is a very old thread, I recommend creating a new question and linking back to this thread.  Otherwise only people following this one will see it.

When you post your question, please...

  • explain the problem / scenario you are trying to solve,
  • include an image of your complete rule, 
  • include images of any relevant actions / branches / conditions / triggers,
  • include an image of the audit log details showing the rule execution,
  • and explain what is not working as you expect.

Those will provide more context for the community to offer suggestions.  Thanks!

Kind regards,
Bill

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events