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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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
Highlighted

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
Published in Jira Service Management

Announcing Jira Service Management!

Hello there Cloud Community members! Today, we’re thrilled to announce Jira Service Management, the next generation of Jira Service Desk. Jira Service Management touts advancements in IT service ...

1,651 views 23 33
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