Trigger an event for specific project only

Using v4.3, I have a workflow used to manage our support queue that pulls issues from multiple projects. One user needs to receive email notifications when a specific event occurs for issues in one and only one of those projects. I created an event and a listener that was specific to that project but he still is receiving notifications any time any issue from any project goes through that workflow step. What's the best way to achieve this end result? The event/listener combo has always worked for me in the past but this is the first time I needed to limit it to a specific project. I can't use the issue type in a workflow scheme because all of the projects share issue types. 

What's the best way to achieve the desired end result here? I'm out of ideas. 

Thanks,

Kathy

2 answers

1 accepted

Accepted Answer
0 votes

There's several ways to do it, but all of them mean making the project an exception.

First, you've got an event being fired by the workflow - that's the most important thing to focus on.  The reason your user is getting emails is because that event is

  • Used in a workflow that is used in several places
  • Is named in a notification scheme that says to notify them, and that scheme is used in many projects

So, you can either 

  • Have two workflows - one fires the event, and the other fires a different one
  • Have two notification schemes - one that does not send an email on that event (use it for most projects) and a second (for the named project) which does notify the user on that event.

Note that the second is a lot easier to create and maintain.

(I'm not actually sure why you have a listener here - JIRA does notifications without any need for a listener, it's built in)

Thanks! I was halfway through implementing the "2 different workflows" solution when I realized that the projects are using the same issue types so I can't throw them all into the same workflow scheme. Different notification schemes makes sense, I was just trying to avoid creating a duplicate scheme that would have to be updated if I updated the first one. But I think you are right that it's the best solution here. I added a listener because of the ability to specify a project key. I was hoping that would tell JIRA, "I only care about this event when it happens in this project." but it didn't. I am curious what the Project Key field in the listener settings is supposed to do.

I don't know what listener functionality you're using there, so I'm not sure what to ask... I'd also take a look at what Joe said - it's a third option. Because you could set up a new role like "Special events", put your user into it (only on that one project) and change your notification scheme so that it only notifies that role for the event. That might not be the best solution for you - it depends on where you want to shift the complexity. I'm pretty sure Joe would agree that the workflow is the worst place for the complexity. His method shifts it into the Project user stuff, and mine into the notification schemes. I can't judge which is better (but I'd probably say his!)

0 votes
Joe Pitt Community Champion Jan 13, 2015

I would create a special project role for the user and add it to the notification scheme and only put the one user in that project role in the one project. No code or separate workflow would be required.

 

That's the one I missed, thanks Joe!

That's a great idea but I'm under strict orders not to go creating new roles will-nilly :-)

Ah, bother, shame, because it's a good option if you have it!

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Sep 18, 2018 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...

24,248 views 2 7
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