Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Rule to sum up story points for parent with logical condition

ahmed.moussa
January 16, 2026

Hi!

I would really appreciate it if someone could help me setup an automation to sum up Story points of work items to parent with the logical condition that the work item is not in status Done

I am using a company based project and I am using this smart value operation:

{{#lookupIssues}} {{#if(not(equals(status.statusCategory.name,"Done")))}} {{lookupIssues.Story Points.sum|0}} {{/}}

Thanks!

1 answer

1 accepted

7 votes
Answer accepted
Trudy Claspill
Community Champion
January 16, 2026

Hello @ahmed.moussa 

Welcome to the Atlassian community.

To help you debug your automation we need additional information.

Please provide screen images that show your entire automation rule.

Please provide screen images showing the details of each step in the rule if the details are not all visible for the step in the diagram.

Please provide screen images showing all the details available in the audit log for an execution of the rule.

What is the result you are getting?

 

ahmed.moussa
January 16, 2026

Thanks @Trudy Claspill  !

The Story Points field does not update at all although the Audit log suggests that the automation was successful

Screenshot Jira.png 

Like Trudy Claspill likes this
Trudy Claspill
Community Champion
January 16, 2026

Thank you for that additional information.

What are you trying to do with the second step in your rule?

 

Let me see if I understand your Requirement

  • When the value changes for Story Point for a work item
  • For the Parent of that work item
  • Sum up the Story points for the Parent's child items where the child items are not Done

For example if you have the following set of issues:

Epic-1
--- Child-1, status To Do
--- Child-2, status In Progress
--- Child-3, status Done
--- Child-4, status Done

If the Story points change on Child-4, you want to add up the story points for Child-1 and Child-2 only (because their statuses are not Done) and update Epic-1 with that value.

Is that correct?

If that is correct I recommend you simply the rule thus:

TRIGGER: keep this as is
FOR EACH: Parent
ACTION: Lookup Issues
JQL: parent = {{issue.key}} and status != Done
ACTION: Edit Work item
Field: Story Points
Value: {{lookupIssues.Story Points.sum|0}}
Like Bill Sheboy likes this
Trudy Claspill
Community Champion
January 16, 2026

I see that in the image of your rule you used Rejected rather than Done. Make sure you change the JQL in my suggested solution accordingly.

ahmed.moussa
January 16, 2026

Thanks! It seems to work as intended!

I don't understand how though :)

I would have guessed that the JQL would return the parent of the issue who's story points field was changed and who's status was not done?

parent = {{issue.key}} and status != Done

 

Trudy Claspill
Community Champion
January 16, 2026

You didn't explain how you came to that conclusion, but I'll try to explain the logic of the JQL.

When you use "parent = X" you are telling Jira you want the issues whose parent is X.

When you are within  a branch the context of {{issue}} changes. It no longer references the issue that triggered the automation. Instead it references the issue(s) being looped over by the branch. In this case because the branch is For Each Parent (of the trigger issue), within the branch {{issue}} references the parent of the trigger issue.

 

So, when story points change for Child-1 the branch begins a loop for the parent of Child-1; namely Epic-1.

Within the branch {{issue}} now references Epic-1.  The JQL says to find issues where the Parent field equals Epic-1, meaning find the child issues of Epic-1, and additionally says to get only the child issues whose status is not Done.

Does that help clear things up?

Like ahmed.moussa likes 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 Champions.
January 17, 2026

Hi @ahmed.moussa 

Yes, and...to the suggestions from @Trudy Claspill 

Scenarios to sum / synchronize a field value between child and parent work items often require multiple rules to help.  That is, a change to the Story Points field is not the only way the value can change.  The keys are how often do you want the field updated and how accurately do you want the value updated?

To learn more cases where the value can be impacted, and what to do about it, please see this article I wrote on the topic:

https://community.atlassian.com/forums/Automation-articles/Automation-concepts-Sum-or-Synch-Fields-with-Parent-and-Child/ba-p/3162890

 

Kind regards,
Bill

Like # people like this
ahmed.moussa
January 17, 2026

@Trudy Claspill  Thanks for the explanation! It's clear for me now. I didn't fully understand for which issues the lookupIssues action was refering to.

Like Trudy Claspill likes this
ahmed.moussa
January 17, 2026

@Bill Sheboy Thanks for the suggestion! The next step for me was to definitely try to handle the case were a work item is added or removed/move to a different parent. I might actually rethink and try to create a rule that triggers daily to run through all the epics and sums the story points of the childs instead of creating 3-4 different rules. The tricky part is that we are running a 3 level hierarchy (Epic -> Feature->Story) so I need to figure out a way to "find" child of child and then sum all they way up to the EPIC. Might give it a try and repost if I get stuck :) 

Trudy Claspill
Community Champion
January 18, 2026

I have got to remember to recommend @Bill Sheboy's articles! He is so knowledgeable about Automation Rules.

Suggest an answer

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

Atlassian Community Events