Hello All,
Am trying to sync two environments using CMJ plugin. Where Scriptrunner related Scripts are not copied over from Source to target. I guess i need to manually move the Scripts, Can you tell where the Script Field scripts are stored in the server? So that I can manually copy over them.
If you open Script Console and then choose the File tab then you will see a help text under the Script text line with the path to the scripts.
Thank you Alexey for your reply. From the Script Console, i can see a <jira-home>/scripts/ as the path mentioned. But when i navigate to the server, there are 0 files in that path <jira-home>/scripts.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Are you sure that there must be scripts? In ScriptRunner you can use inline scripts, which are not saved in the file system.
Go to coq items -> add-ons. Then find Built-In Scripts in the vertical menu and run the Script Registry built-in function. Have a look at what is available.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I can see like they are using Inline Scripts.. :( then no way to move them to another server ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You need to move only configurations right? If so you can move conditions, validators, post functions with add-ons like Project Configurator or Configuration Manager. All other things you should do manually. That is why I try not to use inline scripts. There are more problems with it than gains.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Inline scripts are fine for the odd little thing that you can easily replicate and for developing them, but for proper scripts, I keep the <jira-home>/scripts directory under source control.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Is there a way to change the path of Inline scripts so that the storage location is changed to some standard file system? How to set the path of the script field storage?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can find the answer here:
https://scriptrunner.adaptavist.com/5.3.6/jira/#_script_roots
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Nic Brough -Adaptavist- - Thanks for the suggestion to move scripts to load from files instead of inline. I have more than 150 scripts that are inline and have lost all the scripts a couple of time which has prompted me to move them to individual files and use a source control tool such as Gitlab.
I have a question though - Do you push the code manually to Jira server or have an automated CI/CD pipeline?
I am open to any other suggestions as well.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am curious as to how you "lost" the scripts - that suggests you're hacking the database or deleting them in the UI.
But keeping them in git is a good plan. How they're deployed depends on the target system. I'm old enough to remember the days when we did DevOps without calling it that, and the disasters caused by pushing to production without proper checks - I would never automate a push to production without some preparation and human based gates. Test - yup, automated push when ready, or even when committed so testing can start as early as possible.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I couldn't exactly determine what caused the loss of scripts. Strangely it was only scripts defined as a Number Field and this is the second time we have lost them. The first was a few months back and we never figured out why.
The only possible explanations could be two actions were performed in order to solve very slow background reindex times.
Our background reindex times have increased to 15+ hours and our Jira 7.3.3 currently handles:
But happy to say that I have been able to bring down the reindex time to just under 6 hours after fixing the following:
But I still think 6 hours is way too high. A lock and reindex takes only 1 hours but only when turning off Script runner else it just locks up.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Alexey Matveev, I don't see a help box that tells me the file path. Please see my screenshot above.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Alexey Matveev, nevermind! I followed the link you place on Feb 20.
https://scriptrunner.adaptavist.com/5.3.6/jira/#_script_roots
I was able to see that when the Scriptrunner plugin was installed the directory called "scripts" was created under JIRA home.
Sorry to bother you and thank you for your assistance.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It starts with <jira home>/scripts
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.