Code instead text in html email template

aas December 11, 2019

I try to add customfield into email template like described here https://developer.atlassian.com/server/jira/platform/adding-custom-fields-to-email/ and it works fine for text format, but for html instead the value of field i get a code of getting value123.png

1 answer

1 accepted

0 votes
Answer accepted
Sreenivasaraju P
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 11, 2019
aas December 11, 2019

Thanks I've alrady found it. Replacing this line 

$textutils.htmlEncode($issue.getCustomFieldValue($customfield), false)

 with this

$customFieldManager.getCustomFieldObject("customfield_id").getValue($issue)

solved the problem. But why that error not fixed in the tutorial https://developer.atlassian.com/server/jira/platform/adding-custom-fields-to-email/

Like # people like this

Suggest an answer

Log in or Sign up to answer