Hello,
I am using JIRA Service Desk Application v3.16.8 . I am trying to add a custom field to the email content so that the field content is appeared in the email notification on creation of the ticket.
I followed this link and took into consideration the HTML part :
https://developer.atlassian.com/server/jira/platform/adding-custom-fields-to-email/
I added the following codes in the files issuecreated.vm and customfield.vm using the right custom field ID:
issuecreated.vm :
#parse("templates/email/html/includes/fields/customfield.vm")
customfield.vm :
#disable_html_escaping()
#set ($customfield = $customFieldManager.getCustomFieldObject("customfield_10402"))
#if($issue.getCustomFieldValue($customfield))
<tr>
<th>#text($customfield.name):</th>
<td class="has-icon">
$textutils.htmlEncode($issue.getCustomFieldValue($customfield), false)
</td>
</tr>
#end
The value of the field is not appeared in the email but instead the following line appears :
custom_field_name: $textutils.htmlEncode($issue.getCustomFieldValue($customfield), false)
Can you please advise?
Best regards,
Bruno