Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Defining a class to be used in groovy scripts

Is there a way to define a groovy class somewhere and import it when needed in a groovy script in ScriptRunner for example?

1 answer

1 accepted

0 votes
Answer accepted

Yup, you can do that.

Create a new class using ScriptRunner Script Editor

Screenshot 2020-10-13 at 12.48.17 AM.png

Then you can call it on Script Console:

Screenshot 2020-10-13 at 12.46.14 AM.png

If you created the script in a new folder, please make sure to follow this guide to import the class.

Suggest an answer

Log in or Sign up to answer

Atlassian Community Events