Sending notifications with custom templates
In the previous recipe, Sending notifications for issue updates, we looked at how to set up notification schemes by mapping events to notification recipients.
In this recipe, we will expand on that, and look at how to create our custom events and templates to use for notifications. This has two advantages:
We can customize the content and the look and feel of the notification e-mail
We can specify exactly which event will be fired for each workflow transition, and set up notification rules accordingly
We will create a new event that will represent a request been approved by the management to proceed. This event will be triggered in an Approve workflow transition, and will have a custom template applied to it.
How to do it...
The first step is to create our custom e-mail templates. All mail templates are stored in the JIRA_INSTALL/atlassian-jira/WEB-INF/classes/templates/email
directory, and generally, for each event in JIRA, there are three template...