Forums

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

need help with smart value calculation in jira automation rule

Jyoti Mane
Contributor
May 17, 2022

I have a requirement where I need to calculate the bug scores.

Bug Score Equation = Bug Impact * Bug Type * Bug Likelihood

Where, Bug Impact, Bug Type and Bug Likelihood are Select List custom fields with alphanumeric values.

Eg.

5-Crash: Bug causes crash or data loss 

4-Major usability: Impairs usability in key scenarios Etc

I want to calculate bug score by using the number values from the string.

Let's say if i select bug type  5-Crash: Bug causes crash or data loss , it should return value 5 and can be used in equation to calculate the bug score.

I was able to get the number value by using this :- 

{{#=}}IF({{customfield_12133.value.startsWith("5")}},5,IF({{customfield_12133.value.startsWith("4")}},4,IF({{customfield_12133.value.startsWith("3")}},3,IF({{customfield_12133.value.startsWith("2")}},2,IF({{customfield_12133.value.startsWith("1")}},1,0))))){{/}}

 but, how do i use this value to calculate bug score ???

Please help. Any input is greatly appreciated.

 

1 answer

0 votes
Jyoti Mane
Contributor
May 17, 2022

I was able to get the number value by using this :- 

{{#=}}IF({{customfield_12133.value.startsWith("5")}},5,IF({{customfield_12133.value.startsWith("4")}},4,IF({{customfield_12133.value.startsWith("3")}},3,IF({{customfield_12133.value.startsWith("2")}},2,IF({{customfield_12133.value.startsWith("1")}},1,0))))){{/}}

 

but, how do i use this value to calculate bug score ???

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events