Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Reusable Script Runner code

Erik Saline July 19, 2018

I am creating a few Script Runner built in scripts, rest end point scripts and custom fields scripts.  These scripts have code that can be reused, I am looking for the best way to share this code between the scripts.  Currently I am creating the code in Java and uploading the JAR file to the JIRA class path.  This works but requires a JIRA restart each time the reusable code is updated and re-upload of the JAR file.

 

Any ideas would be appreciated!

2 answers

2 accepted

0 votes
Answer accepted
Mark Markov
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.
July 19, 2018

Hello @Erik Saline

I am also recommend read this articles

https://community.atlassian.com/t5/Jira-articles/Work-with-your-Jira-plugin-from-Adaptivist-ScriptRunner-or-how/ba-p/719050

https://community.atlassian.com/t5/Jira-articles/Part-1-How-to-deploy-Adaptivist-ScriptRunner-scripts-and-objects/ba-p/794887

First one about how to create helpers classes to avoid code duplication.

And second one step-by-step guide how to create scriptrunner-plugin.

Hope it helps!

Erik Saline July 19, 2018

Great, thanks for the reply, I will check it out!

0 votes
Answer accepted
Kristian Walker _Adaptavist_
Community Champion
July 19, 2018

Hi Erik,

Have you looked at creating a ScriptRunner script plugin as described here in order to see if this will meet your requirements.

Regards,

Kristian

Erik Saline July 19, 2018

Great, thanks for the reply, I will check it out!

Suggest an answer

Log in or Sign up to answer