Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Customizing Email Subject using Velocity templates

Divya March 9, 2020

I tried to customize the Subject of the Email (Only when updating an Issue) by editing Velocity templates with reference to below link.

Customize Email content 

I need to pull the value of a custom field into the Email subject. Added the custom ID to the issueupdated.vm file and restarted Jira. But it didn't work. Custom filed value is not added to the email subject. Below is the template path and content of issueupdated.vm file.

Template path: /atlassian-jira/WEB-INF/classes/templates/email/subject

Issueupdated file content:

cat issueupdated.vm
#disable_html_escaping()
(${customFields.get('customfield_14702').getValue()) ($issue.key) $issue.summary

Please anyone help me with this or suggest any workaround.

Thanks,

Divya G

1 answer

0 votes
Boris Berenberg - Atlas Authority
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.
March 10, 2020

Are you sure the Issue Updated event is the one being fired? For example, if you are editing a field in a transition, it could be firing a different event and using a different template.

 

If you want to customize this via the UI, this kind of thing is supported in Notification Assistant for Jira

Suggest an answer

Log in or Sign up to answer