Custom Fields on email notifications

Is it possible to add a custom field to the "Issue Created" and "Issue Summary" notifications that are sent out?

I have added (I think) the custom field to;

issuecreated.vm and issuesummary.vm

and restarted the JIRA instance, but the emails do not have this information on them, I added the following lines;

#if ($issue.getCustomFieldValue("customfield_10910"))
$stringUtils.leftPad($issue.getCustomField("customfield_10910").name, $padSize): $issue.getCustomFieldValue("customfield_10910")

5 answers

1 accepted

You'll need to follow the steps on this link:

It will require you to modify some Jira templates.

This will add the custom fields to all Jira emails for all projects.

My company instead decided to create custom listeners which allow us to create project and event specific emails with all the information we want.

This is what I tried last time, thats how I got the code (above)

Their example for issuesummary.vm has an additional ">" that you don't have. I'm not sure if it makes a difference or not, but you might try adding it.

Also, are there any errors related to this in Jira's logs?

They missed that for the first one but have it for ther others (although the other lines in the .Vm file do not use that) I'll test that tonight.

Nope, no errors that I can see

Another way (without programming) is to use Jirassimo notifications where all custom fields are first-class citizens and you can add any of those to your message template.


This is what I tried last time, thats how I got the code (above)

Unfortunatly this doesn't really help. If it does help then the field I want to put in is just a dropdown box which allows you to select a custom priority field.

I am trying to add a custom field to the 'issue created' template by adding this code:

#if ($issue.getCustomFieldObjectByName("customfield_10100"))
>$stringUtils.leftPad($issue.getCustomFieldObjectByName("customfield_10100").name, $padSize): $issue.getCustomFieldValue("customfield_10100")

where 10100 is the ID of custom field created in JIRA. Unfortunately this solution does not work me, I received email notification without this field.

I am wokring on JIRA v6.4.7

Am I missed something? Please advise.

To add a custom field to the "issue created" email, you have to update the ..../templates/email/text/issuecreated.vm for users receiving text emails AND
....../templates/email/html/issuecreated.vm for users receiving html emails.

html is the default these days.

I ended up creating ...../templates/email/html/includes/fields/mycustomfield.vm and parsed that in the html/issuecreated.vm.

I may be overkill, but it worked for me.

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,991 views 12 18
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot