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 from 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 we would 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. The following are the 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
residing under theWEB-INF/classes
folder.In this case, the event is...