Hi,
I have set up some velocity email templates to include custom fields on the email notificaiton email when an issue is created. This works fine with text fields, but does not seem to work with select list. Is this a bug, or not supported on email templates? My code in the /includes/fields/response.vm is below; custom field 14002 is the select list, doesnt display on the email, custom field 12089 is a text field, which works. If you look at the image, response and categroy are the select lists and city is the text field.
#disable_html_escaping()
#set ($customfield = $customFieldManager.getCustomFieldObject("customfield_14002"))
#if($issue.getCustomFieldValue($customfield))
<tr>
<th>#text($customfield.name):</th>
<td class="has-icon">
$textutils.htmlEncode($issue.getCustomFieldValue($customfield), false)
</td>
</tr>
#end
#disable_html_escaping()
#set ($customfield = $customFieldManager.getCustomFieldObject("customfield_12089"))
#if($issue.getCustomFieldValue($customfield))
<tr>
<th>#text($customfield.name):</th>
<td class="has-icon">
$textutils.htmlEncode($issue.getCustomFieldValue($customfield), false)
</td>
</tr>
#end
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.