Forums

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

Sum all values from children's custom field and paste to epic

Michel Ribeiro Araujo
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!
March 26, 2025

Hey guys! I've created an automation to sum all values from a numeric custom field called "Custo" to paste it in their US parent. So, every time I create or update a subtask, a new sum run to paste the result on their parent (US). As we can see:

1.png

2.png

 

But now I want to repeat this proccess but summing the US's Custo values and paste it on their epic. How can I do?

1 answer

0 votes
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.
March 26, 2025

Hi @Michel Ribeiro Araujo -- Welcome to the Atlassian Community!

Without seeing your entire rule for context (specifically the trigger and conditions), there are several ways to do this, assuming the Sub-task, Story, and Epic are all updating the same field.  To do this with one rule:

  • After the Story is updated, branch to the parent of the Story using JQL
  • Use the Lookup Issues action with JQL to gather the other Stories with the same parent
  • Sum the field with the lookup results to store in the parent Epic

 

Please note this only handles a single case when the field changes in the Subtask.  You may review the other possible cases to decide which ones to handle, possibly with additional rules:

  1. Field changes in a Subtask, so update its parent Story and the grandparent Epic
  2. Subtask is added to a Story...
  3. Subtask is removed from a Story, so update the previous Story...
  4. Subtask is deleted...
  5. Someone manually alters the field in a Story, so perhaps recalculate the field
  6. Someone manually alters the field in an Epic...
  7. etc.

 

Kind regards,
Bill

Michel Ribeiro Araujo
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!
March 26, 2025 edited

I dont know how to use this xD I read but didn't get... If I use lookupIssues.Custo.sum will sum all values of "custo" of each US? But it needs to be only the stories and their sisters within the same epic where the subtask was updated.

Here a quick overview of what I have now:

2025-03-26-23-54-49.gif

as u can see in this GIF, I changed the value of "Custo" from a subtask, and the automation updated the "Custo" value of its parent (the history) by summing all "Custo" values from each child. Since I have only one child/subtask, the value remained the same. But I need to also update the "Custo" value from their epic. 

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.
March 27, 2025

Have you tried the rule change I suggested?

If so and it is not working, please post the following for context:

  • an image of your complete rule in one single image for continuity
  • images of each step in the rule: trigger, actions, conditions, and branches
  • an image of the audit log details showing the rule execution, with all of the areas at the right side expanded

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
atlassian, atlassian government cloud, fedramp, webinar, register for webinar, atlassian cloud webinar, fedramp moderate offering, work faster with cloud

Unlocking the future with Atlassian Government Cloud ☁️

Atlassian Government Cloud has achieved FedRAMP Authorization at the Moderate level! Join our webinar to learn how you can accelerate mission success and move work forward faster in cloud, all while ensuring your critical data is secure.

Register Now
AUG Leaders

Atlassian Community Events