Jira Velocity Template Question
Jiahao Song <[email protected]> Mon, 24 Apr 2023 17:29:10 +0000
| Newsgroups | gmane.comp.jakarta.velocity.user |
|---|---|
| Message-ID | <CO1PR13MB4918BCE04FEEA0B9B18FADB698679@CO1PR13MB4918.namprd13.prod.outlook.com> |
--_004_CO1PR13MB4918BCE04FEEA0B9B18FADB698679CO1PR13MB4918namp_ Content-Type: multipart/alternative; boundary="_000_CO1PR13MB4918BCE04FEEA0B9B18FADB698679CO1PR13MB4918namp_" --_000_CO1PR13MB4918BCE04FEEA0B9B18FADB698679CO1PR13MB4918namp_ Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable Hi Team, I'm modifying the .vm files in my JIRA email template folder and I'd like t= o give you some context before asking my questions. We use Jira 8.20.12 Dat= a Center version and we'd like to modify the email templates. However, we c= ould not see the changes unless we restart the Jira instance. Another approach is that we download the .zip folder of the email templates= , modify the files, save them, and upload the .zip file back to Jira, which= we found somewhat cumbersome and not good for version control. We tried yet another approach which is documented on Atlassian doc<https://= confluence.atlassian.com/adminjiraserver0820/customizing-email-content-in-j= ira-server-1095777454.html>: "On a development instance, you pick up velocity file changes without resta= rting Jira. From <jira-install>/atlassian-jira/WEB-INF/classes/velocity.pro= perties: Change class.resource.loader.cache from true to false Remove the comment sign (#) from #velocimacro.library.autoreload=3Dtrue On a production instance, this change allows you to go back to default Velo= city templates and make changes in them without restarting Jira." However, we found this approach not working and Atlassian Support told us i= t's because we are sitting on a Data Center version. So here are my questions if all the above make sense to you: 1. Can you directly disable the cache in the velocity template? 2. Is there a command that we can use to clear the cache? 3. Is there a way to restart the velocity engine without restarting the = Jira instance? Best, Jiahao Jiahao Song Technical Specialist | InterSystems Direct: +1.617.370.4529 InterSystems.com<http://www.intersystems.com/> [cid:[email protected]] --_000_CO1PR13MB4918BCE04FEEA0B9B18FADB698679CO1PR13MB4918namp_ Content-Type: text/html; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable <html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-micr= osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" = xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" xmlns=3D"http:= //www.w3.org/TR/REC-html40"> <head> <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dus-ascii"= > <meta name=3D"Generator" content=3D"Microsoft Word 15 (filtered medium)"> <!--[if !mso]><style>v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} </style><![endif]--><style><!-- /* Font Definitions */ @font-face =09{font-family:"Cambria Math"; =09panose-1:2 4 5 3 5 4 6 3 2 4;} @font-face =09{font-family:DengXian; =09panose-1:2 1 6 0 3 1 1 1 1 1;} @font-face =09{font-family:Calibri; =09panose-1:2 15 5 2 2 2 4 3 2 4;} @font-face =09{font-family:"\@DengXian"; =09panose-1:2 1 6 0 3 1 1 1 1 1;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal =09{margin:0in; =09font-size:11.0pt; =09font-family:"Calibri",sans-serif; =09mso-ligatures:standardcontextual;} a:link, span.MsoHyperlink =09{mso-style-priority:99; =09color:#0563C1; =09text-decoration:underline;} p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph =09{mso-style-priority:34; =09margin-top:0in; =09margin-right:0in; =09margin-bottom:0in; =09margin-left:.5in; =09font-size:11.0pt; =09font-family:"Calibri",sans-serif; =09mso-ligatures:standardcontextual;} span.EmailStyle17 =09{mso-style-type:personal-compose; =09font-family:"Calibri",sans-serif; =09color:windowtext;} .MsoChpDefault =09{mso-style-type:export-only; =09font-family:"Calibri",sans-serif; =09mso-ligatures:standardcontextual;} @page WordSection1 =09{size:8.5in 11.0in; =09margin:1.0in 1.0in 1.0in 1.0in;} div.WordSection1 =09{page:WordSection1;} /* List Definitions */ @list l0 =09{mso-list-id:1988120512; =09mso-list-type:hybrid; =09mso-list-template-ids:816464330 67698703 67698713 67698715 67698703 6769= 8713 67698715 67698703 67698713 67698715;} @list l0:level1 =09{mso-level-tab-stop:none; =09mso-level-number-position:left; =09text-indent:-.25in;} @list l0:level2 =09{mso-level-number-format:alpha-lower; =09mso-level-tab-stop:none; =09mso-level-number-position:left; =09text-indent:-.25in;} @list l0:level3 =09{mso-level-number-format:roman-lower; =09mso-level-tab-stop:none; =09mso-level-number-position:right; =09text-indent:-9.0pt;} @list l0:level4 =09{mso-level-tab-stop:none; =09mso-level-number-position:left; =09text-indent:-.25in;} @list l0:level5 =09{mso-level-number-format:alpha-lower; =09mso-level-tab-stop:none; =09mso-level-number-position:left; =09text-indent:-.25in;} @list l0:level6 =09{mso-level-number-format:roman-lower; =09mso-level-tab-stop:none; =09mso-level-number-position:right; =09text-indent:-9.0pt;} @list l0:level7 =09{mso-level-tab-stop:none; =09mso-level-number-position:left; =09text-indent:-.25in;} @list l0:level8 =09{mso-level-number-format:alpha-lower; =09mso-level-tab-stop:none; =09mso-level-number-position:left; =09text-indent:-.25in;} @list l0:level9 =09{mso-level-number-format:roman-lower; =09mso-level-tab-stop:none; =09mso-level-number-position:right; =09text-indent:-9.0pt;} ol =09{margin-bottom:0in;} ul =09{margin-bottom:0in;} --></style><!--[if gte mso 9]><xml> <o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" /> </xml><![endif]--><!--[if gte mso 9]><xml> <o:shapelayout v:ext=3D"edit"> <o:idmap v:ext=3D"edit" data=3D"1" /> </o:shapelayout></xml><![endif]--> </head> <body lang=3D"EN-US" link=3D"#0563C1" vlink=3D"#954F72" style=3D"word-wrap:= break-word"> <div class=3D"WordSection1"> <p class=3D"MsoNormal">Hi Team,<o:p></o:p></p> <p class=3D"MsoNormal">I’m modifying the .vm files in my JIRA email t= emplate folder and I’d like to give you some context before asking my= questions. We use Jira 8.20.12 Data Center version and we’d like to = modify the email templates. However, we could not see the changes unless we restart the Jira instance. <o:p></o:p></p> <p class=3D"MsoNormal">Another approach is that we download the .zip folder= of the email templates, modify the files, save them, and upload the .zip f= ile back to Jira, which we found somewhat cumbersome and not good for versi= on control. <o:p></o:p></p> <p class=3D"MsoNormal">We tried yet another approach which is documented on= <a href=3D"https://confluence.atlassian.com/adminjiraserver0820/customizin= g-email-content-in-jira-server-1095777454.html"> Atlassian doc</a>:<o:p></o:p></p> <p class=3D"MsoNormal">“On a development instance, you pick up veloci= ty file changes without restarting Jira. From <jira-install>/atlassia= n-jira/WEB-INF/classes/velocity.properties: <o:p></o:p></p> <p class=3D"MsoNormal">Change class.resource.loader.cache from true to fals= e <o:p></o:p></p> <p class=3D"MsoNormal">Remove the comment sign (#) from #velocimacro.librar= y.autoreload=3Dtrue <o:p></o:p></p> <p class=3D"MsoNormal">On a production instance, this change allows you to = go back to default Velocity templates and make changes in them without rest= arting Jira.”<o:p></o:p></p> <p class=3D"MsoNormal">However, we found this approach not working and Atla= ssian Support told us it’s because we are sitting on a Data Center ve= rsion.<o:p></o:p></p> <p class=3D"MsoNormal">So here are my questions if all the above make sense= to you:<o:p></o:p></p> <ol style=3D"margin-top:0in" start=3D"1" type=3D"1"> <li class=3D"MsoListParagraph" style=3D"margin-left:0in;mso-list:l0 level1 = lfo1">Can you directly disable the cache in the velocity template?<o:p></o:= p></li><li class=3D"MsoListParagraph" style=3D"margin-left:0in;mso-list:l0 = level1 lfo1">Is there a command that we can use to clear the cache?<o:p></o= :p></li><li class=3D"MsoListParagraph" style=3D"margin-left:0in;mso-list:l0= level1 lfo1">Is there a way to restart the velocity engine without restart= ing the Jira instance?<o:p></o:p></li></ol> <p class=3D"MsoNormal"><o:p> </o:p></p> <p class=3D"MsoNormal">Best,<o:p></o:p></p> <p class=3D"MsoNormal">Jiahao<o:p></o:p></p> <p class=3D"MsoNormal"><o:p> </o:p></p> <p class=3D"MsoNormal" style=3D"mso-margin-top-alt:auto;margin-bottom:7.5pt= ;mso-line-height-alt:12.0pt"> <b><span style=3D"font-size:13.0pt;font-family:"Arial",sans-serif= ;mso-ligatures:none">Jiahao Song</span></b><span style=3D"font-family:"= ;Arial",sans-serif;mso-ligatures:none"><br> Technical Specialist | InterSystems <br> Direct: +1.617.370.4529<br> </span><span style=3D"mso-ligatures:none"><a href=3D"http://www.intersystem= s.com/"><span style=3D"font-family:"Arial",sans-serif;color:blue"= >InterSystems.com</span></a></span><span style=3D"font-family:"Arial&q= uot;,sans-serif"><span style=3D"mso-ligatures:none"> <o:p></o:p></span></span></p> <p class=3D"MsoNormal"><img border=3D"0" width=3D"241" height=3D"52" style= =3D"width:2.5069in;height:.5416in" id=3D"Picture_x0020_1" src=3D"cid:image0= [email protected]"><span style=3D"mso-ligatures:none"><o:p></o:p></s= pan></p> <p class=3D"MsoNormal"><o:p> </o:p></p> </div> </body> </html> --_000_CO1PR13MB4918BCE04FEEA0B9B18FADB698679CO1PR13MB4918namp_-- --_004_CO1PR13MB4918BCE04FEEA0B9B18FADB698679CO1PR13MB4918namp_--