Forums

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

Calculate the sum for a custom field

Maela Aseglio September 12, 2024

I want to have the Total amount on the epic coming from the sum of the amouns in the child tasks.

I have ceated a custom field as Number type so that i can make the sum but i would like, with an automation, make the Total amount in the Epic. 

I have seen that they are taliking about look up issues as action but it does not work . could you please let me know how to do that . 

1 answer

2 votes
Michel Neeser
Community Champion
September 12, 2024

Hi @Maela Aseglio

You should be able to do this by using the following expression in your automation:

{{lookupIssues.customfield_XXXXX.sum}}

If this doesn't help, could you share your existing automation rule with us? This way, we can probably support you better.

Maela Aseglio September 13, 2024

Unfortunately the JQL proposed does not work . I would like that: every time that the task transitions to In review, we make a sum of the tasks to the epic level of the total amount the request has , BUT the JQL does not work 

 

see attached file 2024-09-13 15_31_03-Rule builder - Automation - TEST BOX - Jira.png

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 13, 2024

Hi @Maela Aseglio 

To use the Lookup Issues action, first write the JQL needed to gather the issues and add the action inside your branch.  In your case, that would be this:

parent = {{issue.key}}

That will return all of the child issues of the Epic branched to.

Then the correct smart value (or custom field id) is needed to sum the field, as @Michel Neeser described:

{{lookupIssues.customfield_12345.sum}}

Where customfield_12345 should be replaced with your field's information.

To confirm you have the correct smart value for your field, please use this how-to article: https://support.atlassian.com/cloud-automation/docs/find-the-smart-value-for-a-field/

Kind regards,
Bill

Like Michel Neeser likes this

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