Forums

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

Jira Automation to Roll Up Custom Field (Number) to Parent Item

Amanda Barber
Community Champion
July 8, 2025

I'm looking to create an automation that sums a custom field that is listed on subtasks to that custom field on their parent item. Lesson Count is a custom field (number) and the field would be edited for subtasks and rolled up to the Parent work item.

 

Any ideas what's missing here?

Screenshot 2025-07-08 at 1.17.54 PM.png

Thank you in advance!

3 answers

3 accepted

5 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.
July 8, 2025

Hi @Amanda Barber 

Without seeing the details of the edit, I hypothesize it looks like this:

{{issue.subtasks.myCustomField.sum}}

That likely does not work because the subtasks smart value only contains some of the fields for each one.  If it contained all of them, you could imagine a scenario where the subtasks link to other issues, which then link to others, pulling in more and more data...

 

The fix is to use a Lookup Work Items action to gather the subtasks and then sum the field from the results.

 

Kind regards,
Bill

0 votes
Answer accepted
Amanda Barber
Community Champion
July 8, 2025

Oops, thanks @Bill Sheboy and @Trudy Claspill - somehow I knew I could count on both of you to chime in quickly!

 

For the Edit work item fields step, I have setting Lesson Count: {{issue.customfield_10676.plus(issue.subtasks.customfield_10676)}}

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.
July 8, 2025

Your access of the field in the subtasks is missing the sum, so first try setting the field to this

{{issue.subtasks.customfield_10676.sum}}

 

If that does not help, please try using the lookup instead as Trudy and I suggested:

  • trigger: field value changed for Lesson Count
  • condition: issue type equals Subtask
  • branch: to parent
    • action: lookup work items, with JQL of parent = {{issue.key}}
    • action: edit work item to set the field value
{{lookupIssues.customfield_10676.sum}}

 

Like # people like this
Amanda Barber
Community Champion
July 8, 2025

Changing the field to 

{{issue.subtasks.customfield_10676.sum}}

worked!

 

Thank you both!!

Like # people like this
0 votes
Answer accepted
Trudy Claspill
Community Champion
July 8, 2025

Hello @Amanda Barber 

The structure is correct.

What are the details of your Edit Work Item Fields action?

Trudy Claspill
Community Champion
July 8, 2025

And what is the Type of the project (Company Managed or Team Managed)?

Like John Funk likes this
Trudy Claspill
Community Champion
July 8, 2025

Within the For Parent branch you could add as the first component a Lookup Issues action with JQL to gather the subtasks meeting your criteria

Then in the Edit action set the field in the parent issue using a smart value like this that references the custom field of the subtasks

{{lookupIssues.customfield_12345.sum}}

Like # people like this
Amanda Barber
Community Champion
July 8, 2025

Team Managed 

Like John Funk likes this

Suggest an answer

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

Atlassian Community Events