Is there a way to define a groovy class somewhere and import it when needed in a groovy script in ScriptRunner for example?
Yup, you can do that.
Create a new class using ScriptRunner Script Editor
Then you can call it on Script Console:
If you created the script in a new folder, please make sure to follow this guide to import the class.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.