How to Sum Values of Three Fields into a Custom Field

Chris Higginbotham September 4, 2024

I am trying to add 3 custom fields and put that value into another field:

Urgency + Business Value/Impact + Regulatory Requirement/Executive Level Requirement =Prioritization Score

I found this link to 'Examples of using math expression smart values' but still a little lost on how I would go about doing this.

All of the fields are "Select List (single choice)" type custom fields except for the prioritization score which is a " Text Field (single line)" - not sure if this will be an issue as they aren't just number fields, but the single choice value does have a numeric value tied to each option.

Screenshot 2024-09-04 095407.png

 


1 answer

0 votes
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 4, 2024

Hello @Chris Higginbotham 

First, you will need to accomplish this through an Automation rule.

Second, since you have both text and numbers in your fields you are going to have to parse the value in each field to extract just the numeric portion.

I would use this function to extract the numbers that are in between parentheses in the text values of the Select List fields.

https://support.atlassian.com/cloud-automation/docs/jira-smart-values-text-fields/#substringBetween-String-open--String-close-

I would create a variable for each of those fields, and use the above function to get the number and assign it to the variable.

https://support.atlassian.com/cloud-automation/docs/jira-automation-actions/#Create-variable

You can then use those variables in your calculation. You could string them together with + as shown using the syntax at the top of this page:

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

{{#=}}{{variable1}} + {{variable2}} + {{variable3}}{{/}}

 

I recommend that you make liberal use of the Log action to print out to the rule execution audit log the original field values and your variables and your calculation to confirm that you are getting the values you expect.

https://support.atlassian.com/cloud-automation/docs/jira-automation-actions/#Log-action

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