Send custom email to conditional users (Script Runner Question)

Using the script runner plugin, I am creating a post-function for a transition that sends an email. My use case is that every time a ticket is reassigned to a different user, an email must be sent to the new assignee and to any watchers of the ticket that are in the assignee's group.

For example, if the assignee belongs to group A, then the notification will go to the assignee and all the watchers of the ticket being assigned who are also members of group A.

Is this possible? And if so, how can this be accomplished?


1 answer

1 accepted

Through the UI there is not programmatic control of the recipient list. We were just discussing that here:

You have the choice of subclassing it and adding that logic yourself. Or you could create a scripted field that has your logic, and if necessary set the script field to Group A. If it supports groups, which I can't remember if it does. In the mail config you add that field as a recipient.

Could work.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Feb 07, 2019 in Marketplace Apps

A Timeless Love Story

It started as any story starts, on a normal, rainy day.   Admin meets App, and her name was Klok2, and like any first relationship we were both trying to make it work but neither one knew what...

451 views 8 26
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