Send notifications based on issue type for a project in Jira server
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
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:
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):
First, if your group is not created, create it now
Adding a custom event , such as "Project X Bug Created"
Modify Notification Scheme for Project X to add this new event, and notify development-team
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.
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
Go to your workflows, locate the workflow you're currently using for Project X, and click on the "Copy" link to make a copy
Choose an appropriate name (Project X Bugs)
This should bring you to the edit screen. Make sure you're on the "Diagram" view
Click on the transition for which you would like a notification to be sent.
In the example below, I would like a notification to be sent whenever a Jira user executes the To Do transition:
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:
If this post function not exist, you can choose "Add" and Fire the event you created in step 2
Change the event to "Project X Bug Created" and update the function
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.
After you make the change to the post-functions associated to the workflow transition, make sure to publish your changes made to the workflow
Now you need to create the scheme for this issue type - click on workflow schemes
Click Add Workflow Scheme and choose an appropriate name (Project X Bugs Scheme)
Associate this with your new workflow (Project X Bugs), for issue type Bugs (or as many as you would like)
Associate another workflow, your original for Project X, with All unassigned Issue types
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
Click on "Projects" in the JIRA Administration menu, and choose Project X
Scroll down to the workflow section, and click on the associated scheme
Click "Switch Scheme" and choose your newly created scheme Project X Bugs Scheme
After all of this, you might want to do a background re-index
Was this helpful?