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

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • 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

JIRA ScriptRunner: Any way to support script search autocomplete in prod

I know that we can customize the plugin.script.roots variable to support the autocomplete script search. This is also mentioned in the docs here:

I can use the below configuration to change that script root

// under build/plugins/plugin[jira-maven-plugin]/configuration
<systemPropertyVariables> <plugin.script.roots>${project.basedir}/src/main/groovy</plugin.script.roots></systemPropertyVariables>

However, this seems to only work in local dev environment. 

When the plugin gets build into a jar package and uploaded into an online environment. The above config doesn't work.  

I understand I can change the JVM argument to support that, but, by all means, in the prod, all the groovy classes and scripts are inside the jar package. 


So my questions is, is it possible to support the script root search autocomplete to use all scripts inside my plugin?  

1 answer

@fecktty2013 ,

The fact that this works in Dev is great! I think you should look for potential differences between Dev and Production. My suggestion is to start by these questions:

1 - Do you have the same version of Scriptrunner in both Dev and Production?

2 - Do you have the same JIRA version in both Dev and Production?

3- I would also compare Dev and Production JVM arguments to check potential differences. Did you have to set  -Dplugin.script.roots in Dev to make it work?

Thanks for your suggestions. 

1. Yes, 2. Yes.  3. Yes I have to set  -Dplugin.script.roots  in Dev to make it work. 

Then questions become

 1- What path can I set it to? 

 2- The path like  `${project.basedir}/src/main/groovy` is probably for local dev environment. In Prod there is no path and source scripts like this. In prod there is only jar package under $JIRA_HOME/plugins/ folder. How to make the scripts to be discovered just like the scripts under script root ( $JIRA_HOME/scripts/ ) folder to be searched. 

Right, what value are you using in Dev for -Dplugin.script.roots ?

I have a feeling that Scriprunner use the <plugin.script.roots> directive in your pom.xml and combine your value with the current path in runtime (when you enable/install your app).

I think in production your -Dplugin.script.roots should be $JIRA_HOME/scripts (usually this is the default, it's important to check if the user that is running JIRA has read/write access to this folder).

You can test in Dev with -Dplugin.script.roots equals $JIRA_HOME/scripts and restart the application to see if the autocomplete works as expected. Also you can comment the -Dplugin.script.roots in Dev to see if you have the same Prod behavior with no autocomplete and if that happens you can confirm that -Dplugin.script.roots is required to make it work.

Suggest an answer

Log in or Sign up to answer
Site Admin
Community showcase
Posted in Jira Software

Presenting the "Best of 2020" Jira Software roundup!

Catch up with Atlassian Product Managers in our 2020 Demo Den round-up! From Advanced Roadmaps to Code in Jira to Next-Gen Workflows, check out the videos below to help up-level your work in the new ...

7,143 views 8 28
Join discussion

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