Trigger an event for specific project only

Kathy Tempesta January 13, 2015

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

0 votes
Answer accepted
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 13, 2015

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)

Kathy Tempesta January 13, 2015

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.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 13, 2015

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 Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 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.

 

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 13, 2015

That's the one I missed, thanks Joe!

Kathy Tempesta January 13, 2015

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

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 13, 2015

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

Suggest an answer

Log in or Sign up to answer