Hello!
I have a problem. I actively use ScriptRunner, and I have a huge number of workflows where conditions, validators, and post functions are implemented using the functionality of this plugin.
In these conditions, validators, and post functions, I use my own classes that I created through Script Editor (the location of the class files on the server: <Jira home directory>/scripts).
Recently, I needed to make changes to these classes, which involves changing the packages. For example, the class ISSUE was in the package groovy.classes, but now it needs to be changed to groovy.classes.issue.
After I saved the modified class, I see the following errors when transitioning in the Workflow:
The script could not be compiled:
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
Script144.groovy: 2: unable to resolve class groovy.classes.ISSUE
@ line 2, column 1.
import groovy.classes.ISSUE
^
1 error
Therefore, my question is, how can I mass-change the packages in similar lines like:
import groovy.classes.ISSUE?
Doing it manually is not feasible at all, as I would have to make about 5,000 manual changes in each Workflow.