Automation for numeric calculations

Tushar Khandelwal
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!
January 31, 2025

I have 4 numeric custom fields

1. Total value

2. Total Alignment

3. Total Effort

4. Total Score

I have to multiply first 2 custom fields then divide its output by 3rd custom field and then put its total to 4th custom field.

For example - 4*6= 24 , 24/5 = 4.8 (That should be put into 4th custom field ) ( Value * Alignment / Effort = Total Score )

Note - At the end the total score is 4.8 so it should round off to 5.

Can anyone suggest how to create this automation or is there any app in Atlassian marketplace ?

1 answer

0 votes
Marc - Devoteam
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.
January 31, 2025

Hi @Tushar Khandelwal 

Welcome to the community.

This can be done with automation.

See https://support.atlassian.com/cloud-automation/docs/jira-smart-values-math-expressions/ 

Example:

In the edit action set the value of the field Total Score to the following:

{{#=}}{{issue.Total value}} * {{issue.Total Alignment}} / {{issue.Total Effort}}{{/}}
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.
January 31, 2025

Hi @Tushar Khandelwal -- Welcome to the Atlassian Community!

Adding to Marc's suggestion:

Using the information from the same link Marc provided, you may add the ROUND() function around the expression to use the desired precision.  For example:

{{#=}}ROUND({{issue.Total value}} * {{issue.Total Alignment}} / {{issue.Total Effort}}, 0){{/}}

 

Also please note well:

Smart values are name, spacing, and case-sensitive, and often do not exactly match the names of the fields on the issue views.  When an incorrect smart value is used, that will evaluate to null, often failing to work as expected.

To confirm you have the correct smart values (or custom field ID), please use this how-to article with your issue: https://support.atlassian.com/cloud-automation/docs/find-the-smart-value-for-a-field/

 

Kind regards,
Bill

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