Add/Remove (Custom) field to Jira/Service Management/Transport Desk Create Notifications

JIRA and Service Desk system templates includes the most common fields (issue type, assignee, created date, etc) in the bodies of each issue create notification. The fields that are included can be changed without creating new custom templates. It can be done by updating the global custom macros.

Step-by-step guide

Ensure the identifier values for Custom Fields are of the customfield_id pattern i.e: customfield_1000 to prevent any erroneous No Content Found errors which causes notifications to be ignored

Change global custom macros

  1. Go to Notification -> Custom Macros -> Edit. 

  2. Add the following script updating the list as necessary. 

## Adding field customfield_10000 to Jira Themes #set ($serviceJiraFields = ['issuetype','assignee','created','updated','priority','reporter', 'security','customfield_10000']) ## Adding field customfield_10000 to Service Desk Themes #set ($serviceDeskDetailsFields = ['status','issuetype','summary','description','customfield_10000']) ## Adding field customfield_10000 and Sprint to HipChat themes #set ($hipChatJiraFields = ['issuekey', 'issuetype','status','assignee','created','updated','priority','reporter', 'security','customfield_10000', 'Sprint']) ## Adding field customfield_10000 and Sprint to Slack themes #set ($slackJiraFields = ['issuekey', 'issuetype','status','assignee','created','updated','priority','reporter', 'security','customfield_10000', 'Sprint'])

Screen should look

Once saved, it can be testing by using the Preview tool:

  1. Go to Notification -> Preview 

  2. Select either Issue Created JIRA or Issue Create Service Desk template

  3. Select a preview context

  4. Hit Preview

The email now includes the custom field customfield_10000

This change is a global and it will reflected in all system templates. It is the simplest way to add the field. If you need more customization, please visit How-to Create custom Theme and Template Sets.

Related articles