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.
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
}
This is good. I was going to suggest something similar. Let us know if you need more help @Kelly Besmar.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.