I have some scriptrunner customizations that depend on a javascript web resource installed by a Script Fragment.
I know that if I change the .js file, I have to re-load the resource record from the scriptrunner UI and to view the change in my browser, I can reload with cleared cache (open dev panel then ctrl-F5).
This was all working fine during development and I rolled out v1 of my customization in prod for all users and they all picked it up since it was new.
But I'm working on a v2 with some enhancements.
Is there any way I can roll out a change to my customization into my production instance without having to instruct users to clear their cache?
Can't it just work?
I tried to use a conditional location.reload(true) based on comparing a server value with a local variable in my js. But that doesn't seem to clear the correct cache (or enough of it) and the new js version is not loaded.
Doh... I searched for answers all afternoon ... and just as I hit submit, a thought occurred to me.
I can just add a suffix to Module key in the Install Web Resource config.
Like com.acme.fancywebresource.v1 then com.acme.fancywebresource.v2 etc
This seems to cause the resources to be reloaded with a normal refresh.
So users will get the new functionality almost immediately.
Maybe that can help others.
Or perhaps there is another solution?
Hi,
I am facing the same issue. I am installing a scriptrunner fragment which injects a javascript file as a web resource. Whenever the file is updated, I need to disable and enable the fragment so that the cache is refreshed and the new script is installed.
This is not very practical to us because we are automating the procedure and we would like to update the script without manual interventions, at least on jira test instance.
Have you had any solutions or workarounds to overcome this ?
Best Regards
Ala
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No, the best solution I found is the one I mentioned above. Just change the module key string after you update the file.
Maybe you can examine the web traffic when you make such an update and then make a similar rest api call via your automation.
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.