Hi,
I am trying to create a custom email template. I have modified the email-template-id-mappings.xml file as follows:
<templatemapping id="18">
<name>HR Issue Resolved</name>
<template>hrissueresolved.vm</template>
<templatetype>issueevent</templatetype>
</templatemapping>
I have created the hrissueresolved.vm file under the subject and html folders on the server. NOTE: I have not created this file under the text folder as we only use html emails.
I have added a new event called "HR Issue Resolved" to Events in JIRA. I have modified our workflow so that this event is fired when an issue is resolved. I have restarted JIRA. When I tested our workflow, I do not receive any email.
Can anyone please help me out? Thanks!
updated answer with better questions
questions:
-wc
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
JIRA 6.3.15 Server The new email template is based off the issueresolved.vm template. I know it works because if I directly modify the issueresolved.vm template and fire the "Issue Resolved" event when my issue closes, I do get an email and with the modified contents I am expecting. So I know the template is correct. Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, this is part of why customizing JIRA email templates is harder than it feels like it should be. Test with an unmodified copy of issueresolved,vm in hrissueresolved.vm. Make sure the transition is using your custom event and has been published. Make sure your issue is of the right type to be using the workflow. Once all that is working then start modifying the velocity template one small change at a time. You can use velocity.properties to not have to restart JIRA for every change. Then be ready to test hrissueresolved.vm at every upgrade. Are you sure you really need a new template? I generally encourage people to click on the View Issue link in email whenever I can
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thanks Matt - I'd make that the answer
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Andrew Ting - also have the jira mail queue up so you can see if anything is generated to be sent. I strongly suspect that nothing is getting to the queue tho, which indicates a config problem (workflow published?) or problems in the velocity. -wc
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi All, thanks for your responses. I copied the existing issueresolved.vm and renamed it hrissueresolved.vm to eliminate any VM errors. It still doesn't work. It seems that JIRA can't pick up the mapping I've added to the email mapping xml file. It doesn't recognize it at all. I checked the mail queue and no email is coming through. So for now I've just decided to edit the existing vm template files and use an if-statement. Thanks again. Andrew.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.