You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.
View groupJoin the community to find out what other Atlassian users are discussing, debating and creating.
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:
https://scriptrunner.adaptavist.com/6.16.0/jira/#_script_root_search
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?
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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 ...
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.