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 "=="
Hello Community! I hope you've been enjoying the 🍂Apptoberfestivities🍂 (I know I have!) The event is heating up next week with a series of virtual events that we're calling the 🍻🍂Partner App ...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events