Adding custom fields to notification mails
One of the main features of JIRA is its capability to send notifications to selected people on selected events! It is often a requirement for JIRA users to customize these notifications, mainly to add more content in the form of custom fields.
If you understand Velocity templates, adding custom fields to notification mails is a cakewalk, as you'll see in this recipe.
Getting ready
You should know the custom field ID that you need to add into the template. The ID can be found in the URL that you see when you hover over the Edit operation on the custom field in the administration page.
How to do it…
Let us have a look at adding a custom field, X, into a notification mail when an issue is updated. Perform the following steps:
Identify the template that needs to be updated. For each event in JIRA, you can find the template associated with it in the
email-template-id-mappings.xml
file residing under theWEB-INF/classes
folder.In this case, the event is
Issue...