As a Jira administrator, you can set up a custom event to trigger an email notification for a custom workflow transition.
Custom events are most commonly used to generate notifications for custom workflow transitions. For example, your organization might need you to modify the default workflow by adding a workflow step called QA_Inspection (e.g. between Resolve Issue and Close Issue). You would typically also need to generate an email notification to the QA team whenever an issue progresses to the QA_Inspection step of the workflow.
There are three overall steps to achieve this:
Add a custom event to the system (e.g. Issue Awaiting QA).
Configure the notification scheme to send an email when the custom event is fired.
Configure the workflow transition post function to fire the custom event.
Add a custom event
First, you need to create a custom event. Later, you'll use this to trigger the email. To add a custom event:
Choose > System
In the sidebar, under ADVANCED, click Events.
In the Add New Event section, add a name and description for the custom event.
In the Template dropdown, select Generic event.
The custom event must be associated with the generic event email template. A notification scheme configured to notify users of this event will use this email template when sending the notification. It looks very similar to the “Issue updated” event email.
The custom event will appear in the list of events defined within the system. Initially, the event will be marked as inactive, as it is not associated with a notification scheme or workflow post function.
Configure the notification scheme to send email
Now that you have your custom event created, you need to map it to a notification scheme. Notification schemes allow you to reuse your configurations across multiple projects. Learn more about notification schemes.
Select > Issues.
In the sidebar, under ISSUE ATTRIBUTES, select Notification schemes.
Select the notification scheme to edit by clicking the notification scheme's name. Or, create a new scheme.
Add the custom event to the scheme by selecting the Add link in the Actions column next to the event's name. Custom events appear at the bottom of the list.
Add the recipients for the custom event as needed and select Add.
Your notification scheme now includes your custom event. But, you still need to add the event into your workflow, so Jira knows when to trigger the email.
Configure a post function to fire the custom event in your workflows
Post functions allow you to automate some actions when people transition issues down their workflow. In this case, we want to use a post function to tell Jira when you want your custom email event to fire, or what transition should trigger the email event.
Select > Issues.
In the sidebar, under WORKFLOWS, click Workflows.
Find the workflow that you want to add your event to and select Edit.
While viewing the workflow's diagram, select the transition that should fire the custom email event.
While viewing the transition's details, under Options, select Post functions.
In the table showing the transition's post functions, locate the Fire a… post function. Select the pencil icon (Edit) to edit the post function.
In the Event dropdrown menu, select the custom event you want to fire in this transition.
Publish the changes to your workflow by selecting Publish draft.
You did it! Now, any project that uses this workflow will get your custom email event notification on the transition you elected.