How to define the priority by calculate the severity and urgency?

CHEN December 21, 2020

Hello, I want to define the problem priority according to the severity value and urgency value. I have already created custom field "severity" and "urgency" with singel choice select list. And set the select value as 1, 2, 3. Here is the rules for deciding the problem priority:

1. alculate severity*urgency, if the product value is 1 or 2, we set "low" priority;

2. alculate severity*urgency, if the product value is 3 or 4, we set "medium" priority;

2. alculate severity*urgency, if the product value is 6 or 9, we set "high" priority;

And I want to fulfill this rules by scriptrunner custom field with the following script:1.png

But there is always some errors. Could you please teach me how to define it?

1 answer

1 accepted

2 votes
Answer accepted
Dirk Ronsmans
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 22, 2020

Hey @CHEN and welcome!

Perhaps a bit different but why not just use the "no-code" solution of automation to do this?

You won't have to rely on values and calculation but you can just create somewhat of a matrix where you define rules to change the Priority based on a Urgency and Severity value.

 

Also regarding your script, in JS/Groovy the equals operator "=" is actually setting a variable.

So to compare it you would need to use double equals "=="

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events