It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Create global groovy class for scriptrunner Edited

Does anybody can explain me how is it possible to create a global groovy class (like an utility class) and call functions / variables inside Script console or Post function script?

Thanks so much

1 comment

Hi!

I've worked with something similar to this some time ago.

Maybe this could give you and idea of how to do it.

I had a folder on JIRA Scripts folder named "common" with a class "Utilities" with some methods and static variables and other scripts had a import common.Utilities and then, when I wanted to use some of the methods of this class I used Utilities.name_of_the_method()

I don't know if it works on Script Console but I've made it work in Services and Post-Functions.

Regards,
Marcos

Wow, this is what I am looking forward to set/get a global variable for valid issues Can you provide the script for reference.

Comment

Log in or Sign up to comment
TAGS
Community showcase
Posted in Jira Service Desk

How has Jira Service Desk increased productivity in your org?

Hi Jira Service Desk community, Atlassian is on a mission to unleash the potential of all teams, and we know that tools are just one piece of that puzzle. With Jira Service Desk, we have productiv...

201 views 0 3
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you