Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,359,802
Community Members
 
Community Events
168
Community Groups

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

Apps for Confluence you won't want to miss: RSVP for September's Appy Hours

Calling all collaborators and Confluence users! Our Appy Hours event on September 29th features 4 presenters demoing functionality to superpower Confluence. Don't miss learning about these apps i...

110 views 0 9
Read article

Atlassian Community Events