It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Code instead text in html email template

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

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 Sambit Choudhury likes this

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you