Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

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

How Add Custom Field (Sprint) to Email Template Edited

I want to add a custom field value to an email template.
Did according to this instruction

I added to the file (WEB-INF\classes\templates\email\html\issueupdated.vm)

Then I created a file "customfield.vm" (WEB-INF\classes\templates\email\html\includes\fields\customfield.vm)
Here is my code:

#set ($customfield = $customFieldManager.getCustomFieldObject("customfield_10016"))
    <td class="has-icon">     
        $textutils.htmlEncode($issue.getCustomFieldValue($customfield), false)

This code doesn't work. It doesn't display field values sprint ("customfield_10016")

1 answer

I solved my question.
In the file along the path (WEB-INF\classes\templates\email\html\issueupdated.vm)
Instead of the previous line, I inserted

#rowWrapperNormal("#parse('templates/email/html/includes/fields/customfield.vm')" '' 'wrapper-special-margin')

Then in the file "customfield.vm" along the path (WEB-INF\classes\templates\email\html\includes\fields\customfield.vm)
I pasted the code

#set($substr=$sub.substring(5, $sub.indexOf(',')))
<table class="keyvalue-table">


Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Jira

⏰ Day in the life of a Jira Admin!

Hello Community! We thoroughly enjoyed this just-for-fun conversation in the Jira Admin Group about what it's like to be a Jira Admin. For #JiraJuly, our talented designers created these graphics t...

869 views 2 22
Read article

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