How to run Groovy script without using ScriptRunner?

David A February 22, 2016

I want to run a Groovy script but don't want to invest in the ScriptRunner plugin as we very seldom run scripts.

Please could someone suggest the easiest way to do this and, if possible, direct me to some documentation about how to do it?

9 answers

1 accepted

0 votes
Answer accepted
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 22, 2016

You'll need to find or write a framework that can be plugged into JIRA and execute the groovy for you.

Miroslav Kravec June 28, 2016

Well. It's a lot of cheaper to develop it on our own. License price $8000 for ScriptRunner is just too big, not worth it... It's 4 times month price of the developer. Development of such framework takes much less...

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 29, 2016

It may well be.  ScriptRunner is definitely overkill if you only want a handful of scripts.  In fact, rather than duplicating the part of ScriptRunner you think you need, you would probably be better off writing your specific requirements as an add-on.  The SDK makes it very easy to write add-ons (create skeleton, add code, compile and test locally, upload add-on)

0 votes
David A February 23, 2016

Thanks for all the replies to my question.

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 23, 2016

If you're running an older version of JIRA that you can install SR 3.x on (JIRA 6 or below)

0 votes
David A February 23, 2016

Thanks, that's very helpful. Out of interest, under what circumstances can one run the 'free version of ScriptRunner'?

0 votes
Boris Georgiev _Appfire_
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.
February 23, 2016

OK, so you can't use the free version of ScriptRunner. Then better write a simple JIRA add-on using java and use it to bulk change what you need. 

You can use the same sample code I've provided(with just a few modifications) in a simple add-on that exposes a REST endpoint(so you can easily call it).

You can grab a working REST add-on example from https://developer.atlassian.com/docs/atlassian-platform-common-components/rest-api-development/developing-a-rest-service-plugin

https://bitbucket.org/atlassian_tutorial/refapp-rest-service-plugin

0 votes
David A February 23, 2016

JIRA 7.1 (JIRA Software)

0 votes
Boris Georgiev _Appfire_
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.
February 23, 2016

And which version of JIRA you're running ?

0 votes
David A February 22, 2016

The script you suggested here smile

0 votes
Boris Georgiev _Appfire_
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.
February 22, 2016

What kind of script are you planning to run ?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events