Information Technology Reference
In-Depth Information
How to do it…
All mail templates are stored in the <JIRA_INSTALL>/atlassian-jira/WEB-INF/classes/
templates/email directory, and generally, for each event in JIRA, there are three template
files:
The Subject template : This is the template file for the e-mail's subject line, which
is stored in the subject subdirectory
The Text template : This is the template file for e-mails sent in the text format,
which is stored in the text subdirectory
The HTML template : This is the template file for e-mails sent in the HTML
format, which is stored in the html subdirectory
To start creating our own e-mail templates, we first need to create the three files mentioned
in the previous list of template files and place them in their respective directories. Take spe-
cial note that all three files need to have the same filename with a .vm extension.
We will start with the subject template as follows:
1. Create a new file with the following code snippet:.
#disable_html_escaping()
$eventTypeName - ($issue.key) $issue.summary
2. We now need to create the body of the e-mail, keeping in mind that we have to cre-
ate two versions: one for text and one for HTML. The following snippet shows the
HTML version; for the text version, simply remove the HTML markups:
#disable_html_escaping()
Hello $issue.reporterUser.displayName,
<p>
Your request <a href="">$issue.key</a> has been
approved, with the comment below:
</p>
<blockquote>
<p>
$comment.body
</p>
</blockquote>
Search WWH ::




Custom Search