Resend Notification-eMails after Permission-Change in Script listener...?

Hello there,

I want to implement a Groovy Script via Adaptavists ScriptRunners "Custom Script Listeners"-Funktion.

It should adjust the issues security level if the assignee is changed (or the assignee is entered at issue-creation-time). Basically it's working well, but if I change the assigne to a previously unauthorized user the mail notification to the assignee is missing.

I'm pretty sure about the reason: The assignee is at the assignment-moment not authorized to view the issue, so no notification-mail is sent.

Is it possible to 'resend' in this case the "IssueAssigned"-eMail?

BTW: Is there any kind of "Loop protection" implemented in Script-Runner? If I call IssueManager.updateIssue() which triggers the same event on which my custom script does listen... or which is the best way to avoid a loop?

1 answer

0 vote

> BTW: Is there any kind of "Loop protection" implemented in Script-Runner? 

No - it's on you. If you update an issue in an Issue Updated listener just don't dispatch an event, or dispatch only if you know what you're doing. And test all paths through your code.

I think I understand what you're saying. You probably want to fire another event in your code that the mail service can get.


Hello Jamie,

I think the method generateNotifications() of the Interface com.atlassian.jira.event.listeners.mail.IssueEventMailNotifier would be the right place to re-trigger the notification-email for the event the script was triggered by.

But on which object can I call generateNotifications()?

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
Bridget Sauer
Published yesterday in Marketplace Apps

Calling all developers––You're invited to Atlas Camp 2018

 Atlas Camp   is our developer event which will take place in Barcelona, Spain  from the 6th -7th of   September . This is a great opportunity to meet other developers and get n...

39 views 0 3
Read article

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