I'm trying to add a custom field value to the create issue HTML email template, but stumbling. The field is required, so there will always be a value present on issue creation.
Attempt 1:
I've followed the directions here: https://developer.atlassian.com/server/jira/platform/adding-custom-fields-to-email/?_ga=2.56485292.608403254.1563807890-1574526416.1556543036
When I add the customerfield.vm as indicated below
#disable_html_escaping()
#set ($customfield = $customFieldManager.getCustomFieldObject("customfield_15707"))
#if($issue.getCustomFieldValue($customfield))
<tr>
<th>#text($customfield.name):</th>
<td class="has-icon">
$textutils.htmlEncode($issue.getCustomFieldValue($customfield), false)
</td>
</tr>
#end
Instead of the comma separated values of the field, I get this message: $textutils.htmlEncode($issue.getCustomFieldValue($customfield), false)
Attempt 2:
I tried the suggestion in another article, but instead of the value, I get the label name a second time.
#disable_html_escaping()
#set ($customfield = $customFieldManager.getCustomFieldObject("customfield_15707"))
#set ($customfieldvalue = $customfield.getValue($issue))
#if($customfieldvalue)
<tr>
<th>#text($customfield.name):</th>
<th>$customfield</th>
</tr>
#end
and tried
#disable_html_escaping()
#set ($customfield = $customFieldManager.getCustomFieldObject("customfield_15707"))
#set ($customfieldvalue = $customfield.getValue($issue))
#if($customfieldvalue)
<tr>
<th>#text($customfield.name):</th>
<th>$customfieldvalue</th>
</tr>
#end
I can't tell if my issue is coming from the createissue.vm or customfield.vm or how to fix it. any help/suggestions would be very much appreciated!
Hi Srinivasan,
Customising email content on the On Demand instance is a restricted feature. Please read
https://confluence.atlassian.com/display/AOD/Restricted+Functions+in+Atlassian+OnDemand
Cheers
Bhushan
Hello Srinivasan,
You can use our plugin to fully customize content of email notification from jira-ondemand. We also support conditional templating and custom fields.
Check it out https://marketplace.atlassian.com/plugins/net.vacom.jirassimo
Best,
Vladimir@Jirassimo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.