Compare Epic's story points with sum of children story points

Maurice B_
Contributor
February 18, 2025

Dear community, 

I'm currently struggling with a jira automation. 


What I would like to have is: 

1. Scheduled rule (e.g. every Tuesday) 

2. Lookup all Epics from a certain project 

3. Compare the Story Points of the Epic with the sum of story points of all children issues 

4. When the sum of all children story points is greater than the parents Epic story points, send just one email with all Epics of the project that need to be checked. 

I'm currently using following rule that works for but that is not what I am exactly looking for: 

Bildschirmfoto 2025-02-18 um 12.03.21.png

 

Any suggestions how to fulfill my requirements?

Thank you in advance. 

2 answers

1 accepted

0 votes
Answer accepted
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.
February 18, 2025

Hi @Maurice B_ 

Short answer: a single rule cannot send one email for this scenario unless there is fixed / known number of epics (e.g., exactly 10 epics) AND the total number of epics and child issues is less than 100.  The reasons are due to rule limits and how branches execute in parallel.

If the above criteria apply, the single rule could repeatedly use the Lookup Issues action and store the sum in a created variable, once for each epic, and then send the single email.

Otherwise multiple rules would be needed: one to identify when the sums do not match to add an indicator to each epic, and another rule to send the email notification after the first rule is completes running.

Kind regards,
Bill

Maurice B_
Contributor
February 19, 2025

Hi @Bill Sheboy , 

thank you for your valuable feedback! 

How is it possible to connect multiple rules? Could you draw an example for me? 

Appreciate your support!

Best regards, 
Maurice

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.
February 19, 2025

The idea is not to connect multiple rules.  Instead it is:

  • One rule runs whenever a Story changes its Story Points and the Story has a parent Epic.  The Story Point sum for the Epic's children are compared to the Epic's value, and an indicator (i.e., a custom field, or label) is added to the Epic.
  • A second rule, running on a schedule, sends the notification if there are any Epics which have that indicator.

 

An alternative to the is approach is to prevent the values from getting out of sync by automatically updating the Epic when needed.

How is the sum currently set in the Epic, and when does that happen?

Maurice B_
Contributor
February 20, 2025

Hi @Bill Sheboy

thank you. I did not think about two different rules so far but that seems to be a good idea. 

Currently, the sum is not calculated and the story points must be entered manually. I have proposed to sync the story points whenever a value changes but currently it is not desired. 

Thank you! 

 

0 votes
Vishal Biyani
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.
February 18, 2025

@Maurice B_ 

 

You are using Scheduled as a trigger.

Therefore, triggerIssue will not come into play, in my opinion.

 

For Lookup issues is your JQL something like below:

project = XYZ and issuetype in standardIssueTypes() and issuetype not in (Epic, Initiative) and parent is not Empty

This will return all standard issuetypes except Epic and Initiative and those that are linked to Epic.

In your use case is One Epic linked to multiple Story/Task? if so, get list of distinct parent key (Epic).  Loop through this list using advanced branching.

Then in the branch have a lookup based on

parent = {{issue.key}}

Now lookup issues has all issues linked to Epic. sum up Story Point and compare with Epic Story points. 

Can you try based on this logic?

 

 

Maurice B_
Contributor
February 18, 2025

Dear @Vishal Biyani , 

thank you. Yes, one Epic is parent of multiple tasks/stories.  

Could you please share an example how this rule should look like?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events