Receiving notifications when a user from a particular group creates a ticket

Hi everyone, we're looking for a way to have a user notified whenever a particular user (or user from a particular group) opens up a ticket in any project. So basically the second one of those users creates a ticket, this master user will get an email notification informing them of the creation.

I'm familiar with some of the reporting features, such as creating a filter for these user's issues and sending a report out every night, but it doesn't look like that's what we're looking for. I'd prefer to do this without any paid plugins if possible, as getting those things approved for purchase is kind of difficult.

1 answer

I've done this with a custom listener; first I created a custom event, then I used the script runner listener for firing the event when a criteria was met, with the criteria being that the user was a member of the group.  Then I added a notification for that event using the "issue updated" email template.

More streamlined would be to just emit a custom email and bypass the custom event, but then you'll need to write your own email template.  There are pros and cons to both approaches; in this case, since you want it for all projects, you probably don't want the event as then you need to trust that every notification scheme will maintain the correct notification.

Are there any tutorials for writing listeners?

You wouldn't have to write this one, beyond the condition.  The interface provides examples, I'll take a look and see if this is one of them.

For both "Fires an event when condition is true" and "Send a custom email", built-in listeners, there is a sample condition for "Reporter is in a particular group":

import com.atlassian.jira.component.ComponentAccessor

def groupManager = ComponentAccessor.getGroupManager()
groupManager.isUserInGroup(issue.reporter?.name, 'business-users')

So (as a JIRA admin) you'd go to Administration / Add-ons, then "Script Listeners" underneath "SCRIPT RUNNER" along the left.  Then "send a custom email", project key "All Projects", Events "Issue Created", Condition as described above, adjusting for your group name, then provide an email template and a subject template.  Something like:


Issue: $issue.key  opened by user/group X


Issue: $issue.key  opened by user/group X

Suggest an answer

Log in or Sign up to answer
Community showcase
Published 19m ago in Jira Ops

Jira Ops Early Access Program Update #5: Three new ways to get a live Jira Ops demo!

Welcome to your weekly Jira Ops Early Access program update, where we’re sharing news and updates on Jira Ops progress as we work toward our 1.0 release. If you ever want to drop us feedback or ideas...

3 views 0 0
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