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

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

This widget could not be displayed.
Tarun Sapra Community Champion Nov 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
}

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
Community showcase
Posted Tuesday in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

286 views 1 4
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you