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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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

Add custom field to email content

Hello,

I am using JIRA Service Desk Application v3.16.8 .  I am trying to add a custom field to the email content so that the field content is appeared in the email notification on creation of the ticket. 

I followed this link and took into consideration the HTML part :

https://developer.atlassian.com/server/jira/platform/adding-custom-fields-to-email/

I added the following codes in the files issuecreated.vm and customfield.vm using the right custom field ID:

issuecreated.vm :

#parse("templates/email/html/includes/fields/customfield.vm")

 

customfield.vm :

#disable_html_escaping()
#set ($customfield = $customFieldManager.getCustomFieldObject("customfield_10402"))
#if($issue.getCustomFieldValue($customfield))
<tr>
<th>#text($customfield.name):</th>
<td class="has-icon">
$textutils.htmlEncode($issue.getCustomFieldValue($customfield), false)
</td>
</tr>
#end

The value of the field is not appeared in the email but instead the following line appears :

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

 

Can you please advise?

Best regards,

Bruno

 

1 answer

Not sure on the Velocity side of things, but we allow you to configure how email templates look, and what fields are included, using a WYSIWYG editor in Notification Assistant for Jira

Hello Boris,

Thank you for or answer. The solution you propose implies installing a new feature on jira and purchasing a license right? Is this the only way to fix this issue! Can you please confirm?

Best regards,

Bruno.

Hi Bruno,

I am not a velocity expert so there may be a solution here that I am not aware of. My company makes Notification Assistant for Jira and it allows for customization of email templates using an editor in the UI.

Thanks,
Boris

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