Customizing email content (separate notifications)
When using separate notifications, every issue update is sent in a separate email. Templates that control how notifications look are in the Jira installation directory.
Customizations to Velocity templates or other Jira files are not included in the scope of Atlassian Support.
Good to know
Any changes to Velocity templates (as well as JSPs) will be overwritten following a Jira upgrade. In such a case, you will need to manually copy your modified files to the new Jira version. If the Velocity templates and/or JSPs have changed in the newer version, you will have to manually port your customizations into them (as opposed to copying these files directly over from your old Jira installation to your upgraded one).
- Apart from modifying how your emails look, you can also add extra custom fields to describe the issues you're being notified about more precisely. For more info, see Adding custom fields to emails.
Email template locations
Go to the following location in your Jira installation directory:
If you're using Jira sources files, go to
- Under this directory, there are three subdirectories:
html- contains the templates used to create emails in html
text- contains the templates used to create plain text mail outs
subject- contains the templates used to generate the subject of the emails
- Bring the template up in your favorite text editor. Refer to the the Jira template documentation and Velocity Users Guide to make the customizations you want.
- Restart Jira.
Creating new email templates
- Create your new
mytemplate.vmfiles in the
subjectdirectories, based on the existing files in those directories
- Add the templates to
atlassian-jira/WEB-INF/classes/email-template-id-mappings.xmlto make them valid choices for when you are adding a new event.
The Issue object is passed into the
vm templates. Notice some of its implementation in
/includes/summary-topleft.vm. As an example, calling
$issue.getProject() would allow you to determine the project an issue comes from, and even create logic to show different information for emails from different projects.
Deploying Velocity templates without restarting Jira
In a development instance, you can play with picking up velocity file changes without a restart.
- Remove the comment sign (
Making this change in production will eventually lead to Jira not serving pages along with the 'ran out of parsers' error in the log file.
See also Adding Custom Fields to Email.