Forums

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

How to sum the values of the same custom field of different Task tickets

vincenzo_spatafora
Contributor
December 10, 2024

 

Dear ALL,

I’d like to code an automation rule which sums the values of a custom field coming from a bunch of a specific issue type, let’s suppose it’s a Task.

Where this bunch of Task is coming from a JQL and let’s suppose there are 2 Task. (I’m aware that unfortunately the lookupIssues function doesn’t support the custom field).

I need now to sum the custom_field_x value of Task 1 with the custome_field_x value of Task 2.

As you can see from the log:Log.PNGmy smart variable Sum is doing the sum of the same custom_field itself: do you know (given it’s possible) as how to sum custom_field_x of Task 1 with the custome_field_x of Task 2? Such that the sum is 3?

Here the remaining estimate:

Remestimate.PNG

and here the Sum smart variable:

Sum.PNG

Thanks, Vincenzo.

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.
December 10, 2024

Hi @vincenzo_spatafora 

You are correct the Jira Data Center version of the Lookup Issues action only supports a limited number of fields at this time.

There are two possible workarounds, depending upon your rule needs: the bulk-handling feature or calling the REST API endpoints.

Please look here to learn more about these methods: https://community.atlassian.com/t5/Jira-articles/How-Can-I-Sum-Up-Multiple-Issues-into-a-Parent-Number-Field/bc-p/2883071#M16701

Kind regards,
Bill

vincenzo_spatafora
Contributor
December 11, 2024

Hi@Bill Sheboy.

It's a real pity this functionality is not yet available for Jira DC (like also the "Advanced branching" being not available as well).

Thanks and always a pleasure getting your comments/suggestions.

Kind Regards,

Vincenzo.

Like Bill Sheboy likes this

Suggest an answer

Log in or Sign up to answer