Send notifications based on issue type for a project in Jira server

Still need help?

The Atlassian Community is here for you.

Ask the community

Issue

You would like to send a notification to a certain team when one (or more) specific issue types are created.  For example, if a bug is created in Project X, you would like an email notification to be sent to the existing group development-team.

In Jira, it is only possible to configure Notification Schemes at the Project Level but not at the Issue Type level. There is an open suggestion suggestion to implement allow this configuration at the issue type level, which is tracked in in the public ticket below:
JRASERVER-4742 - Getting issue details... STATUS

Since this configuration is currently not available in Jira, this KB article provides an alternate solution which consists in configuring a workflow and associating to a specific issue type.

Resolution

This solution may cause indexing issues. As a workaround you may add the "Re-Index Issue" in the post function of the workflow transition. Please refer to JRA-32508 for further information.

This is a bit tricky, but can be done.  You will need to work with Workflow Scheme, Workflow, Notification Scheme, and Events (links to our detailed documentation are included in-line with these instructions):

  1. First, if your group is not created, create it now
  2. Adding a custom event , such as "Project X Bug Created"
  3. Modify Notification Scheme for Project X to add this new event, and notify development-team
    1. Note, Notification Schemes are defined on a per-project basis, so go to Project X, Administer Project, and make sure you are modifying the correct scheme.
  4. To send notifications for a/multiple specific issue type(s), but not all, you will have to create a workflow, a workflow scheme to be used for these specific issues, and associate the two
    1. Go to your workflows, locate the workflow you're currently using for Project X, and click on the "Copy" link to make a copy
      1. Choose an appropriate name (Project X Bugs)
    2. This should bring you to the edit screen.  Make sure you're on the "Diagram" view
      1. Click on the transition for which you would like a notification to be sent.
        1. In the example below, I would like a notification to be sent whenever a Jira user executes the To Do transition:
      2. Click on the "Post Functions" link, and choose "Edit" for the Fire a Issue Created event function. Please note that, in some case, the post function might be displayed with its class name com.atlassian.jira.workflow.function.event.FireIssueEventFunction rather than with its actual function name, as shown in the screenshot below:

        1. If this post function not exist, you can choose "Add" and Fire the event you created in step 2
      3. Change the event to "Project X Bug Created" and update the function
        1. This means that with bugs, only those users associated on the Notification Scheme with the "Project X Bug Created" event will receive notifications when the bug is created.  If you would like the normal "Issue Created" notifications to go out as well, you will need to add those groups/users/roles to this notification as in Step 3 above.
    3. After you make the change to the post-functions associated to the workflow transition, make sure to publish your changes made to the workflow
    4. Now you need to create the scheme for this issue type - click on workflow schemes
      1. Click Add Workflow Scheme and choose an appropriate name (Project X Bugs Scheme)
      2. Associate this with your new workflow (Project X Bugs), for issue type Bugs (or as many as you would like)
      3. Associate another workflow, your original for Project X, with All unassigned Issue types
  5. Finally, you need to associate this new scheme with Project X, so that it knows to use your new workflow with Bugs, and the old workflow with everything else
    1. Click on "Projects" in the JIRA Administration menu, and choose Project X
    2. Scroll down to the workflow section, and click on the associated scheme
    3. Click "Switch Scheme" and choose your newly created scheme Project X Bugs Scheme
  6. After all of this, you might want to do a background re-index



Last modified on Sep 6, 2022

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.