JETI's Field Picker drop down allows you to select system or custom field and get the snippet of Velocity markup needed to extract the value of the field. However it does not render the complete HTML structure that you may need to keep the correct layout of the HTML content in your email body.
The reason for this is that when you develop a new template you may want to have your custom HTML structure and layout.
If you develop a template based on JETI's or Jira's default templates, you can use the below HTML markup to add your fields:
Code Block |
---|
language | html/xml |
---|
title | HTML markup to add fields to your email templates |
---|
|
#if($!jetiFieldRenderer.renderCustomField($issue, 'customfield_12345'))
<tr>
<th>
Name of the customfield_12345:
</th>
<td>
$!jetiFieldRenderer.renderCustomField($issue, 'customfield_12345')
</td>
</tr>
#end |
Note |
---|
title | Add Rich Text (jEditor rendered) Field |
---|
|
JEditor allows you to enter rich text content in custom fields. In order to render Rich Text fields in email in Jira 6.x and later versions, you must add this: Code Block |
---|
#set ($fieldValueInHtml = $!jetiFieldRenderer.renderCustomField($issue, 'customfield_12345'))
$fieldValueInHtml |
Using this technique, HTML content of the field value will not be escaped. |
The complete body of the default mail template extended with a custom field should look as follows.
...
language | html/xml |
---|
title | Default email template with a custom field |
---|
...
Expertisefinder redirect |
---|
forced | false |
---|
dest | {"value":"https://docs.meta-inf.hu/email-this-issue-for-jira-server-data-center/documentation/outgoing-emails/email-templates/adding-fields-to-email-templates"} |
---|
type | url |
---|
enabled | true |
---|
|
Thank you for visiting our old product documentation site. Note that we no longer store or update our documentation here.Please navigate to our new documentation site and update your bookmarks accordingly. If you're looking for the former content of this page, click here. |