You are viewing the old version of the documentation. See the latest version here: CRM for Jira Server Home

You are viewing the old version of the documentation. See the latest version here: [CRMJS:CRM for Jira Server Home]

It's possible to add CRM custom fields, for example Company or Contact, to JIRA Notification templates.

Actually, it's possible to any custom fields as described there: https://developer.atlassian.com/jiradev/jira-architecture/jira-templates-and-jsps/adding-custom-fields-to-email

Below  we describe step by step how to add Company field to Email Template.

 

Step 1: Find the Custom Field ID

You need to find out a custom field ID for you Company field. To do this go to Administration->Issues->Custom Fields, find you field in a list and choose Configure in the right menu (but don't click).

 Find ID of you custom field in a browser status bar, see screenshot below. ID of the custom field in the screenshot is 10300

 

Step 2: Edit the email template

Locate the Velocity template of the email type you wish to modify. For instance, you may want to modify the 'issue created' template, as well as the template reused in 'issue commented'.

Location of templates you can find there: https://confluence.atlassian.com/jira/customizing-email-content-185729653.html

  • To add a field "Contact" to a template, add the following snippet where you want it to appear in the file:
$issue.getCustomField("customfield_10300").getCustomFieldType().getContact($issue.getCustomFieldValue("customfield_10300")
  • To add a field "Company" to a template, add the following snippet where you want it to appear in the file:
$issue.getCustomField("customfield_10301").getCustomFieldType().getOrg($issue.getCustomFieldValue("customfield_10301"))

Step 3: Restart JIRA

To make the changes take effect, restart JIRA.

 

 

Learn more here:

https://confluence.atlassian.com/display/JIRA/Customizing+Email+Content
https://developer.atlassian.com/jiradev/jira-architecture/jira-templates-and-jsps/adding-custom-fields-to-email
https://developer.atlassian.com/jiradev/latest-updates/developer-changes-for-older-jira-versions/preparing-for-jira-6-1/jira-email-template-changes

 

  • No labels