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.
It looks like you're new here. Sign in or register to get started.