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
Not sure on the Velocity side of things, but we allow you to configure how email templates look, and what fields are included, using a WYSIWYG editor in Notification Assistant for Jira
Hello Boris,
Thank you for or answer. The solution you propose implies installing a new feature on jira and purchasing a license right? Is this the only way to fix this issue! Can you please confirm?
Best regards,
Bruno.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bruno,
I am not a velocity expert so there may be a solution here that I am not aware of. My company makes Notification Assistant for Jira and it allows for customization of email templates using an editor in the UI.
Thanks,
Boris
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.