Activate custom email templates without restart JIRA - How to?

Rumceisz July 8, 2013

Hi All,

we created a bunch of new emial templates and we would like to activate them to go on with the work (creating custom events, etc.). In earlier Jira version (major v4) it was possible to change the templates without server restart. We use now v5.2.8 and I'd like to ask you how to activate these email templates without restart?

It is fundamental because our Jira is used 0-24 so a restart is recommended to avoid.

Thanks in advance for help!

Rumi

2 answers

1 accepted

0 votes
Answer accepted
Alex Perez
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 8, 2013

As far as I know, velocimacro.library.autoreload tell Jira to reload and not cache any velocity template. So this may help you if you're changing existing templates that you've already deployed.

But unfortunately, to change this setting you must restart Jira. Also, you must map the events to the velocity templates so it-s necessary to edit the email-template-id-mappings.xml file, and restart jira again.

So ... you-ll need to restart at least 1 time the first time you deploy the templates ... then you can modify these templates without restarting

HTH

Rumceisz July 8, 2013

Thanks for the hint!

Rumi

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 8, 2013

Just don't forget that you will need to restart your production service regularly, before it chokes up the cache and dies.

You may also experience odd pages going wrong due to this change (with increasing frequency as time goes on between restarts), although they should be fine if the users seeing them simply refresh the page.

Rumceisz July 8, 2013

Hi Nic,

actually I need to restart JIRA at least one time for uploading the email setttings to the events. I changed the velocity.properties as detailed above but nothing happened.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 9, 2013

You're missing the point - you are going to need to keep restarting your Jira, regularly and frequently.

If you've changed the properties file and restarted, then I don't understand why it wouldn't work - it does here on Test, although I needed to do it twice, and that was after I realised I'd put the wrong owner on the file (must stop doing "sudo bash")

0 votes
Christian Czaia _Decadis AG_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 8, 2013

Hey Rumi,

check the docs:

https://confluence.atlassian.com/display/JIRA/Customising+Email+Content

Deploying Velocity templates without restarting JIRA

In a development instance, you can play with picking up velocity file changes without a restart.
From <jira-install>/atlassian-jira/WEB-INF/classes/velocity.properties:

  1. Change class.resource.loader.cache from true to false
  2. Remove the comment sign (#) from #velocimacro.library.autoreload=true

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.

Cheers

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 8, 2013

Bother you beat me to it.

I was going to say "you can't do this in 4 or 5 without running out of resources, so you should not really have done it in production in your old version, let alone version 5". Also, you need to restart Jira to pick up the changes in that properties file too...

Rumceisz July 8, 2013

Thanks for the hint!

Rumi

Suggest an answer

Log in or Sign up to answer