Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

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 Dec 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
Community showcase
Published in Apps & Integrations

🍻🍂Apptoberfest Update: Upcoming Virtual Events 🎉

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 ...

474 views 5 18
Read article

Community Events

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

Events near you