Add *js file on releasenotes.vm vel.template

Adria Alonso
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.
August 9, 2019

Just created some custom js code for the realeasenotes velocity template that comes with Jira.

I would like to separate javascript from the template, but I amb facing some issues.

Wich would be the simplest way to separate it and link it?

I've tried with the webresourcesmanager but it doeesnt seem to work. also. there are several plugin-webresources xml files, not just one.

Other things i have tried is to link it in secure folder, but it whas throwing MIME stric error, when i fixed it, it just doesnt appear.

Any suggestions?

3 answers

1 accepted

0 votes
Answer accepted
Adria Alonso
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.
November 8, 2019

I've separated the code throughout using different *.vm files using script tags then the parse method on velocity

Helps you to separate and structure the code if you're only doing simple modifications on the VTL

0 votes
Adria Alonso
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.
August 27, 2019

requireResourcesForContext just prints itself in a velocity template.

I've tried in rest-mock also in plugin-mock

its quite difficult to add my own js and css to a vm in jira. not getting what i need by reading the documentation of WebResources....

0 votes
Adria Alonso
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.
August 27, 2019

Suggest an answer

Log in or Sign up to answer