I'm testing the switch from 2.x to Script Runner 3.0.6. I have a helper class
JiraTools within the package eventim. For 2.x of Script Runner this class was saved under atlassian-jira/WEB-INF/classes/eventim/JiraTools.groovy and all other scripts could use this class via import eventim.JiraTools.
For SR 3.0.6 this doesn't work anymore. Within the console for example I get the error
I copied the file to jirahome/scripts/eventim/JiraTools.groovy but that doesn't help.
This problem doesn't affect every ScriptRunner extension point. Specifically, you can import classes from your Script Root in a Behaviour, but not in a workflow Post Function.
Inelegant, but effective, you can call Groovy's evaluate method on the script file that contains code you want to reuse, rather than using an import statement. e.g.
Another more involved workaround would be to put your utility class inside a Script Plugin. You could then import it into your post function using the @WithPlugin annotation as described in the documentation on scripting other plugins. Creating a script plugin is a more intense workaround, requiring a bit of developer expertise.