Forums

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

Calculation between different issues

Anette Noll
Contributor
May 15, 2023

Hi all,

after reading a lot I am not sure if this is possible at all. Would be great if someone could help with this:

Issue type A contains 1 number field B.
Various issues of issue type A are created and all number fields contain values.
Is it possible to sum up the values of field B of all issues?

I know that calculated fields work within an issue. But is calculation possible between issues?

1 answer

1 accepted

0 votes
Answer accepted
Fernando Eugênio da Silva
Community Champion
May 15, 2023

@Anette Noll 

Is possible calculate the field values between issues. First of all, I'm assuming that the new issues created are associated with the first Issue A with the same linkissue type. On my example, I will use 'Relates to' link type. But feel free to adjust for your case.

 

Define your trigger

Define your Condition

Add a lookupIssues Action:

- Add the JQL: issue in linkedIssues({{issue.key}},"relates to")

 

Change 'Relates to' for the link type you're associating your Issue Types

 

Add your Action for Edit Issue > Select your field:

- In your field, insert this smart value:

{{#=}} {{lookupIssues.customfield_XXXXX.sum}} + {{triggerIssue.customfield_XXXXX}} {{/}}

Replace XXXX for the field ID.

Here is the example of the rule:

Screenshot_110.png

Hope this helps

Regards,

Fernando

Anette Noll
Contributor
May 15, 2023

Hi Fernando Eugênio da Silva,

thank you for quick response. 

The issues are not associated at all by a link type. Just isolated issues of same issue type.

So this trigger will propabably not help.

 

Regards, Anette

Fernando Eugênio da Silva
Community Champion
May 15, 2023

Hi, Anette

In that case, you can still do this using lookup, but unfortunately you'll have to manually manage these other isolated issues.

My recommendation is that you link them through some link type to make this easier.

For example: if you use something like this in the lookup: issue type = Task

Jira will fetch all the 'Tasks' issues and then the sum of the field, and that won't look right because you'll have more values than you need.

If you link them together, it will work better. Without the link type, you won't have a specific reference to search for these issues and add the values.

Regards,

Fernando

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events