Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

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
This widget could not be displayed.
TAGS
Community showcase
Published in Jira Service Management

Announcing: Incident Responders and Linked Alerts in Jira Service Management

THESE FEATURES ARE NOW AVAILABLE FOR ALL CUSTOMERS --- Hello Atlassian Community! Today, we’re excited to announce the rollout of two new incident management features in Jira Service Managem...

998 views 8 12
Read article

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