I just migrated my JIRA server from 7.3.0 to 8.1.0 and I have difficulty to make my personal Javascript work.
This javascript is inserted in the description of a personal field.
It appears that the javascript was automatically played when I displayed an Issue containing that field in JIRAv7.3.0.
After migration, in JIRAv8.1.0 the javascript is not automatically played when the issue page is loaded (or the issue create). But in that same page the javascript is well played when I do clic on the field (containing the javascript code) to edit it.
Can you reproduce this behavior ? Is there a way to auto-load personal javascript in JIRA v8.1.0 issues ?
Thanks for reading me.
I suspect that if you inspect your pages with your browser's development tools, you will find that the javascript you have injected is running, but is no longer doing anything because of the changes to the way pages work in Jira 8.
Atlassian are gradually removing the ability to use js in descriptions (it doesn't work at all in Cloud, and Server is going that way) because it is unsafe, unreliable and they change the way js is used so often, you really don't want to be using it.
TLDR: you will need to rewrite your javascript from scratch, to fit in with the latest js usage Atlassian have used.
Thanks for you reply.
My personal JS is running only when there is an Event (a clic) on the field containing the JS code in the field description. Anyone could test with a simple JS code :
alert( 'Hello, world!' );
I do not need to rewrite my javascript from scratch. There are effectively only little modifications to apply to my code. But my main JS code is the same.
I try to fit my JS code to the js usage Atlassian used. But can you advise me more ? What is the js usage Atlassian used ? Is there a documentation (on "how inject javascript in Jira 8") I could refer to ?
The solution I found till now is using the javascript insider module JsIncluder. I think the Custom JS module could also work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.