I need to configure the new version (jira 7.4) to have the generated email notifications include the status of the ticket at each stage:
Having these statuses in the email subject was very helpful, especially for setting up Outlook email Rules.
You would need to customize the velocity templates. Please see here
Also, in the velocity template you have the issue object thus from issue object you can easily extract the status and put in the subject line of email.
Thanks Tarun for the reply. Could you please be more specific. I just installed jira 7.4 and restore the xml and everything working fine. Able to create tickets and recieving email notifications for every status. I read the above doc in the link you provided before i created this ticket but still no clue. Really Appreciate if you provide steps. I am new to this JIRA and we are using standalone win 2012 server.
JIRA generates emails in reaction to events using a templating engine. The templating engine is Apache's Velocity. This is a relatively easy to use templating language that can pull apart java objects in useful ways. The mails are generated inside JIRA by invoking Velocity with a set of objects of relevance to the event.
To change the columns in your filter subscriptions, you don't need to customize the mail templates.
There's a feature request to improve this at JRA-7266, which you can vote on to improve its chances of being implemented.
Bear in mind that the next time you upgrade JIRA – or need a new installation for any reason – you will have to manually copy any changes you have made to Velocity templates (as well as JSPs) into the new installation of JIRA. 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).
Customizations to Velocity templates or other JIRA files are not included in the scope of Atlassian Support.
Email template locations
Open up your JIRA distribution, and navigate to the following paths:
The WEB-INF/classes/templates/email/ of the <jira-application-dir> in your JIRA installation directory.
The jira/src/etc/java/templates/email/ in your extracted JIRA source directory.
Under this directory there are three directories: html, text and subject. The html subdirectory contains the templates used to create emails in html, while the text directory the plain text mail outs. The subject directory contains the templates used to generate the subject of the emails. The templates are named after the event that will trigger the email.
Bring the template up in your favorite text editor. Referring to the JIRA template documentation (particularly Velocity Context for Email Templates) and Velocity Users Guide, make the customizations you want.
For new email templates:
Create your new mytemplate.vm files in the html, text and subject directories, based on the existing files in those directories
Add the templates to atlassian-jira/WEB-INF/classes/email-template-id-mappings.xml to make them valid choices for when you are adding a new event.
Note that since JIRA 4.1 each new template has to have a corresponding file in the subject directory.
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.
The Above documentation explains all that is required. You need to work with someone who has access to the server where JIRA is deployed as you need to modify files present in the "installation directoy" of JIRA on the server. The system information section of jira shows the path to installation directory on the JIRA server.
This is a bit advance configuration thus you need someone with basic linux/windows admin skills and small bit programming as you need to customize the velocity template.
I am the one who installed win 2012 server, installed Jira and make it work and is in production since last week. I have full access the server. My hosting team helped me with SSL/HTTPS. I read somewhere that i need to modify issuecreated and other VM files from C:\Program Files\Atlassian\JIRA\atlassian-jira\WEB-INF\classes\templates\email\subject folder. But the programming code i have no clue what to add.
I would suggest you only modify issueUpdated velocitytemplate as you want to include issue status in the subject line and for issue create event it doesn't matter as at the time of creation of the issue the status is open. Thus, you can modify the issueUpdated.vm file and since issue object is present thus it's very simple change not much programming experience in the subject you just need to add
$issue.getStatus() in the subject at the right place in the string.
Even when user created the ticket, the subject : simply shows [JIRA] (CTT-xxxx) and not [JIRA] Created: (CTT-xxxx). My previous jira version 3 does show [JIRA] Created: (CTT-xxxx). This thing changed now after i updaged to 7.4 version. I compared with the old version and couldn't figure out the difference. I looked into below link and followed it and still no luck.
In the old version the velocity templates might have been modified. When you upgrade to the new version you have to manually take the backup of oldvelocity templates and set it for the new version. Customizations are not automatically upgraded while upgrading JIRA.
I checked the files and there is no change on the date for any of those files. It's exactly the date and time of the installation on the older version. What i read so far is that prior to version 4 there are no extra changes needed to show Subject:[JIRA] Created: (xxx-xxxx). Starting from jira version 5 we need to modify the VM files to get that. And i tested copying the old version velocity templates and pasted on newer version and still no luck.
Well the answer you have shared has the exact same link which I have shared as the top voted answer. I don't know where the confusion is. As, you just have to edit the template and thats it.
As far as coding is concerned then since your requirement is to append the current workflow status in the subject line thus you would need to add the code line in the subject line.
Since you have moved from JIRA version 3.x to 7.x then ofcourse there are changes in the notification template hence you need to do this very simple customization.
Can i try the below code in issueupdate.vm?
[Created]: ($issue.key) $issue.summary
[Assigned]: ($issue.key) $issue.summary
[Resolved]: ($issue.key) $issue.summary
[Closed]: ($issue.key) $issue.summary
[Reopened]: ($issue.key) $issue.summary
Badges are a great way to show off community activity, whether you’re a newbie or a Champion.Learn more
Every time you release software, there's a bit of risk – that there's a bug, that something breaks, or that the feature doesn't resonate with customers. Feature flagging helps make high stakes s...
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!
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