Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Set Priority value based on custom date fields

Lakshmi CH
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 2, 2020

Hi Team,


Can you please help how to set this using behaviours(script runner). I have already changed the priority value based on other field values and component field values, but not able to do with custom date field value. Could you please someone help on this.

* If issuetype in (Bug, "Change Request") AND Need By Date is a date in the past then set Priority=Critical.

* If issuetype in (Bug, "Change Request") AND Need By Date is today then set Priority=Major.

* If issuetype in (Bug, "Change Request") AND "Escalation?" = No AND Need By Date is in the future then set Priority=Minor.
 
This is based on select field value,

{noformat}
if (getFieldById(getFieldChanged()).getValue() == "Yes") {
     getFieldById("priority").setFormValue("Blocker")
}

{noformat}

Thanks!

 

1 answer

1 vote
Andrew Morin
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 2, 2020
Lakshmi CH
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 2, 2020

Hi @Andrew Morin ,

 Do you have anything on date.

* If issuetype in (Bug, "Change Request") AND Need By Date is a date in the past then set Priority=Critical.

* If issuetype in (Bug, "Change Request") AND Need By Date is today then set Priority=Major.

* If issuetype in (Bug, "Change Request") AND "Escalation?" = No AND Need By Date is in the future then set Priority=Minor.

Andrew Morin
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 2, 2020

Suggest an answer

Log in or Sign up to answer