How to sum a custom field value from child issues to epic parent

Alon Shoham November 27, 2022

Hello,

I'm trying to find the smart value that describes a parent's child issues.

I have created an automation that sum the values of a custom field, from sub-tasks to their Stroy/Task parent.

Now, I'm trying to level it on step up, and take the same value I got for Story/Task and sum it up to the epic level (taking all the value from all the stories/tasks under the epic).

You can see the automation that takes from sub-tasks to story/task (in the answer below) - which works perfectly.
I can't find a way to take it one level up to epic.

 

2 answers

1 accepted

1 vote
Answer accepted
Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 27, 2022

Hi @Alon Shoham 

I wrote an article a while back about adding original estimate to an Epic. You could use this as a starting point an replace your original estimate with your variable https://community.atlassian.com/t5/Jira-Software-articles/Calculate-the-sum-of-original-estimates-of-all-issue-types-to-an/ba-p/1660572

Alon Shoham November 28, 2022

@Alex Koxaras _Relational_ Thank you so much for your answer.

The automation failed in the 'Advance' JSON format.

Those are the fields and hirarcy I have, If you could suggest me how to write the JSON format I would appreciate it a lot!

1. In every Task/Story there is a field called "Effort estimation - DS".
(The 'Lookup issues' is success to find all the tasks/stories under certain epic)

2. In every Epic there is a field called "Effort estimation - DS".

I want the automation to sum the values from "Effort estimation - DS" in all the tasks and stories and present the total sum in the Epic's "Effort estimation - DS" field.

That's how I wrote the JSON:

{
"fields": {
"Effort Estimation - DS": {
"Effort Estimation - DS" : "{{lookupIssues.Effort Estimation - DS.sum}}"
}
}
}

Alon Shoham November 28, 2022

image.png

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 28, 2022

Hi @Alon Shoham 

Your JSON should be something like:

{
"fields": {
"Effort Estimation - DS" : "{{lookupIssues.Effort Estimation - DS.sum}}"
}
}

You had an extra field for a strange reason. Maybe you got confused with my automation and the "time tracking" field, which is a special bundle type of field.

Try the JSON above and let me know. If it fails, see the audit log and paste the message.

Alon Shoham November 28, 2022

@Alex Koxaras _Relational_ you are awesome!!! It works perfectly! 

The community is never disappointing! thanks again.

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 28, 2022

@Alon Shoham nice to hear that! Kindly mark my answer as accepted in order to help others! Cheers!

Drew Lahl
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 21, 2023

Thank you for the guidance on this @Alex Koxaras _Relational_ 

Helped me with a similar scenario!

Taha Tabatabaei March 4, 2024

@Alex Koxaras _Relational_ 
Hello, I attempted using this method to sum up the values of a numeric custom field (e.g., customfield_11035) in tasks to their epic. However, each time the automation is triggered, it consistently returns 0 as the result within my epics. Do you have any suggestions on how to rectify this issue?

0 votes
Alon Shoham November 27, 2022

Automation:

image.png

Muhammad Moazzam Hassan March 9, 2023

is it working fine?

Suggest an answer

Log in or Sign up to answer