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

Create global groovy class for scriptrunner

David STOCKY June 7, 2018 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

2 answers

0 votes
Faith Johnson January 13, 2019

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

0 votes
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.
June 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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Upcoming Jira Service Management Events