How do I send an email when a Priority 1 issue is down graded (so not = 1-Critical)?

Kelly Besmar November 20, 2017

I am not sure which script runner function to use or how to code for a change in the issue.priority field. We want to send an email when a Priority 1 issue is down graded (so not = 1-Critical). How do I build it?

I have already created a script Listener which will send an email if a Priority 1 Issue is changed to resolved. However, that rarely happens without being down graded.

 

1 answer

1 vote
Tarun Sapra
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 20, 2017

Hello Kelly,

In the script runner plugin, you can check if the value of the field "Priority" is changed or not and based on changeHistory of the issue. Thus, you can send an email if the value of priority has been downgraded.

def change = event?.getChangeLog()?.getRelated("ChildChangeItem").find {it.field == "Priority"}

if(change) {
// you r code here to check the new priority value and check if it's downgraded then return true
}

Joshua Yamdogo @ Adaptavist
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.
November 20, 2017

This is good. I was going to suggest something similar. Let us know if you need more help @Kelly Besmar.

Suggest an answer

Log in or Sign up to answer