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:
But there is always some errors. Could you please teach me how to define it?
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 "=="
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.