Forums

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

Add points from different fields

Carlos Barros
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!
July 8, 2025

Hello everyone!

I have 4 different fields and each of these fields has a weight, is it possible to calculate each field * its weight and add the results in a fifth field?

Example:

Field A, if the option is 1 it is 1*5, if the option is 2, it is 2*5
Field B, if the option is 1 it is 1*4, if the option is 2, it is 2*4
Field C, add (5+10) + (4+8) and show the total 27

 

Thanks a lot

2 answers

0 votes
John Funk
Community Champion
July 8, 2025

Hi Carlos - Welcome to the Atlassian Community!

Yes, you can do that. Create a custom number field to store the value. I assume that is probably already Field C. 

Then create an automation rule to calculate the values. You can either do a series of IF/ELSE Conditions or use a lookup Table. 

Or you can use variables. Here is a previous post that should provide you with good guidance. 

https://community.atlassian.com/forums/Jira-questions/Setting-Up-Jira-Automation-to-Calculate-Total-Score-from-Custom/qaq-p/2555691

 

Carlos Barros
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!
July 10, 2025

Hi John, thanks!

But didn't work.

I created the var varImportancia
{{#if(equals(issue.customfield_10106, "1 - Baixa"))}}1
{{else if(equals(issue.customfield_10106, "2 - Mediana"))}}2
{{else if(equals(issue.customfield_10106, "3 - Importante"))}}3
{{else if(equals(issue.customfield_10106, "4 - Muito Importante"))}}4
{{else}}0{{/}}

 

and var varEsforco

{{#if(equals(issue.customfield_10107, "1 - 8 a 24 horas"))}}4
{{else if(equals(issue.customfield_10107, "2 - 25 a 80 horas"))}}3
{{else if(equals(issue.customfield_10107, "3 - 81 a 159 horas"))}}2
{{else if(equals(issue.customfield_10107, "4 - 160 a 240 horas"))}}1
{{else}}0{{/}}

 

and in the field Barros Field I inserted {{#=}} {{varImportancia}} + {{varEsforco}} {{/}}

When I change  two fields I receive Missing parameter(s) for operator +u: +

In Barros Field I put, for example {{issue.customfield_10107}} and i see the result 1 - 8 a 24 horas, but Jira dont convert 1 - 8 a 24 horas to 4

Any ideas?

 

Thanks

Like John Funk likes this
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.
July 11, 2025

Hi @Carlos Barros -- Welcome to the Atlassian Community!

Adding to the suggestions from @John Funk and @Mikael Sandberg ...

There is no else conditional expression as you tried.  Here are the supported formats to do that: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-conditional-logic/#if

 

For what you originally asked, please try John's suggestion to use a Lookup Table as that will be easier to maintain the mapping of field values to desired numbers:

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

 

Kind regards,
Bill

Like # people like this
0 votes
Mikael Sandberg
Community Champion
July 8, 2025

Hi @Carlos Barros,

Welcome to Atlassian Community!

Yes, you can do this with automation and smart values and math expression.

Carlos Barros
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!
July 10, 2025

Hi Mikael!

IF I sum two numbers works, but I need sum two var, and Jira returns the value null

 

Any Ideas?

 

Thanks?

Like John Funk likes this

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