Forums

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

Automation - sum sub-task in parent field

Robin_Janott September 26, 2024

Hi community! 

 

 

I need your support for the following automation:

When the field 'Reststunden'(Remaining hours) is changed in a sub-task, the value of all Reststunden 'remaining hours' of the sub-tasks is summed and entered into the 'Reststunden'(Remaining hours) field of the parent task. 

Until this point, the automation works. - No Problem. (Picture)automation - reststunden.png

 

Now I want to add: 

Filter the sub-tasks by the field 'Chapter' = 'Werkzeugbau' and calculate the values. Then, insert these into the parent Field "Reststunden" (remaining hours).

 

If a different value is present in the field 'Chapter', then do not include the values from 'Reststunden' (Remaining Hours)

 

Thank you in advance

1 answer

1 accepted

1 vote
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.
September 26, 2024

Hi @Robin_Janott 

There are two ways to accomplish the conditional summation:

#1) Use the Lookup Issues action with JQL to gather the subtasks meeting your criteria, and then sum on the field for the issues found: {{lookupIssues.customfield_10241.sum}}

https://support.atlassian.com/cloud-automation/docs/jira-automation-actions/#Lookup-issues

 

#2) You could continue to use the subtasks smart value, and add list filtering and a math expression: https://community.atlassian.com/t5/Automation-articles/Filtering-smart-value-lists/ba-p/1827588

{{#=}}0
{{#issue.subtasks}}
{{#if(equals(your custom field for chapter,"Werkzeugbau"))}}
+{{customfield_10241}}
{{/}}
{{/}}
{{/}}

 

Kind regards,
Bill

Robin_Janott September 30, 2024

Hey Bill, 

thanks a lot. 

I chosed #1 and it works perfect. 

-GOAT

Like Bill Sheboy likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
atlassian, atlassian community, loom ai, atlassian loom ai, loom, atlassian ai, record recaps of meetings, meeting recaps, loom recaps, share meeting recaps,

Loom’s guide to great meetings 📹

Join us to learn how your team can stay fully engaged in meetings without worrying about writing everything down. Dive into Loom's newest feature, Loom AI for meetings, which automatically takes notes and tracks action items.

Register today!
AUG Leaders

Atlassian Community Events