Forums

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

How to sum field value of subtasks in done status of a stroy

Saif Allah AZZAZA November 4, 2025

Hello,

I’ve created a custom field at the subtask level and would like to calculate its sum at the story level, limited to subtasks with a status of “Done.” I can sum all subtasks successfully, but I haven’t found a method to filter them based on status.

Thanks in advance!

BR

 

3 answers

1 vote
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.
November 4, 2025

Greetings, community!

As a reminder, when posting bot / AI-generated content the source needs to be referenced in the text of your post and the content validated.  To learn more, please see the community guidelines:

https://community.atlassian.com/forums/custom/page/page-id/rules-of-engagement

 

The "smells" the suggestions are bot / AI-generated are:

  • rule actions were updated many months ago for Jira Cloud from "issue" to "work item", and the guesser source data has not caught up yet
  • this scenario has no need for the Re-fetch Work Item Data action, yet the suggestions add it arbitrarily...and both in the exact same location
  • the mixed fonts indicate copy-and-paste from another source, rather than typed in by a person using the existing features of community posting

 

Kind regards,
Bill

0 votes
Gor Greyan
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.
November 4, 2025

Hi @Saif Allah AZZAZA

This version should work for you.

Trigger: Issue transitioned → To Done

Condition: Issue type = Sub-task

Branch: For parent

Action: Re-fetch issue data

Action: Lookup issues with JQL:

parent = {{issue.key}} and issuetype = sub-task and status = done

 
Action: Edit Field→ set your numeric field to:
{{lookupIssues.customfield_12345.sum}}

 

0 votes
Ignacio Vera
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.
November 4, 2025

Hi @Saif Allah AZZAZA 

I would manage this with two rules.

First rule: 

Trigger:  Issue transitioned --> To Done
Branch: Parent
Actions:

Re-fetch issue data

Edit issue fields --> Story/task field = {{issue.subtasks. filter(s => s.status.name =="Done").sum(customfield_12345)}}

 

Rule 2 (optional, when subtask leaves Done):

Trigger: Issue transitioned --> From Done
Branch: Parent
Actions:

  1. Re-fetch issue data

  2. Edit issue fields --> same expression as above

(Enable Allow rule trigger: issues in this rule can trigger other rules,” so the Story or taks updates correctly)

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