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
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Carlos Barros,
Welcome to Atlassian Community!
Yes, you can do this with automation and smart values and math expression.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mikael!
IF I sum two numbers works, but I need sum two var, and Jira returns the value null
Any Ideas?
Thanks?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.