Forums

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

Complex Calculated Fields

Greg Bammel
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 3, 2023

What is the best way to create a custom complex calculated field?  For example, I have fields priority and severity.  I wanted both priority and severity to map to a number.  The calculated field should be the multiplication of those two fields?  Is this possible?  If yes, what is the best way to tackle it? 

3 answers

1 accepted

2 votes
Answer accepted
Mikael Sandberg
Community Champion
March 3, 2023

Hi @Greg Bammel,

Welcome to Atlassian Community!

You have a couple of options to do this. You could use automation to do the calculation via smart values and math expressions. Another option would be to use something like Scriptrunner, it has calculated fields that you could use or you could write a script that does the calculation. Back in the days when I was on Jira Data Center I created a Scriptrunner script that calculated three different fields to get a risk value. 

1 vote
Vincent Mutambuki { Mumo Systems }
Contributor
March 3, 2023

You can create use Abacus to create a formula with two custom fields and a results fields as shown below. 

Screenshot 2023-03-03 at 3.40.02 PM.png

Then create an execution plan and use the map field values action to map Priority values to numbers. Make sure to store the value to the MappedPriority number field you created in the formula above.

Add another map field value action to map severity values to numbers. Lastly, add you formula which will use the mapped values to do calculations based on the issue event trigger you select. 

Screenshot 2023-03-03 at 4.01.14 PM.png

 

Disclosure - I represent Abacus vendor.  This is not intended to be a commercial but to solve a this problem. Use it at your will.

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 3, 2023

Hi @Vincent Mutambuki { Mumo Systems } 

When recommending a marketplace vendor product, please ensure you disclose your affiliation to that vendor in your post wording. For more information about this, please see:

Atlassian Community online guidelines for Marketplace and Solution Partners

https://community.atlassian.com/t5/Marketplace-Apps-Integrations/Atlassian-Community-online-guidelines-for-Marketplace-and/ba-p/689723

Kind regards,
Bill

Like # people like this
1 vote
Riley Venable
Community Champion
March 3, 2023
You can use the arithmetic operations mentioned in the context to create a custom complex calculated field. For example, you can set the custom field to be the multiplication of the priority and severity fields by using the expression "{{Priority}} * {{Severity}}".

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