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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

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
4,556,871
Community Members
 
Community Events
184
Community Groups

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

Marcos Sanchez
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Jun 18, 2018

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
AUG Leaders

Atlassian Community Events