I have (a lot of) scripts and dependent classes (in subfolders of the script root folder).
When modifying a dependent class, the calling scripts are often still using an "older" version of the dependent class. In the Adaptavist documentation it is stated I should "...modify the calling script by adding whitespace or a comment to get it to recompile...". How to do this if I have a lot of scripts (hundreds!) and making often modifications to the dependent classes (that's where all my business logic is). Is modifying just one dependent script enough ?
I have a similar issue. I have a couple of class files where I have some common lists/maps/functions used across several scripts. If I update anything in those classes, the class isn't automatically reloaded. While the workaround; clearing the groovy cache, works fine, this breaks the custom JQL functions while the scan runs, which will break filters/boards/reports using those functions. I've been trying to track down a method to manually call an update of the updated class file without having to flush the entire cache. If I can do that, I can throw together script to publish to the built-in page and reduce this to a single-click operation that doesn't affect the rest of the system.
If I work out how to do this, I'll post it here.
@Corey Leighton Did you make any progress on this ;-)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@David Harkins I hadn't followed back up with this. Have I made progress? Yes, and no... Turns out that flushing the cache was breaking my custom JQL function due to a mismatch in the custom function's class name. Once I resolved that, a cache flush did not also force me to republish the custom functions. But if I updated the classes I still had to do a cache reset to get them to go live.
I haven't retested this with a more current version though, but I will and post my results.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes it is.
If you only add a whitespace to one, that will force recompilation of that script. Which will force recompilation of the class that it extends if the hashes do not match.
So yea don't worry, you only need to modify one of your scripts.
If this solved your answer, please accept the answer so that other users know that this question has been solved.
May I help you further?
Cheers!
DYelamos
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have the same issue: sometimes, for unknown reason (no time to investigate further), scripts do not get correctly updated.
Work-around : clear the scriptrunner groovy cache (built-in scripts)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The work-around is working for me.
But I don't know how long I can keep editing workflow post functions after every class update when testing.
Is everyone else living with this since the first post in 2017??
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.