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

1 vote
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
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Julia Dillon
Posted Apr 17, 2018 in Jira

Tell us how your team runs on Jira!

Hey Atlassian Community! Today we are launching a bunch of customer stories about the amazing work teams, like Dropbox and Twilio, are doing with Jira. You can check out the stories here. The thi...

771 views 2 19
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