I have ScriptRunner for Jira and use it for many things, validators, post-functions, Listeners, etc.
I also have a custom, quite long and complex ScriptRunner for Jira script developed in the console.
Whenever I want to execute it with certain text parameters, I have to copy it from a local file, paste it in the console, type the parameter in the actual code and then run it. (image 1)
Is there any other way?
Can I save the script somewhere and have it executed with a manual parameter field that then sends this to the script?
I imagine some kind of page like the ones in "Built-In Scripts", for example the "Config exporter" where it has a text parameter field called "Base path for output" and then you have the Run button that executes something on the back using this parameter, then displays the result. (Image 2)
Hi @Ricardo Martinez ,
I believe Script Editor with the usage of Dynamic Forms could do the trick.
You can send the saved code in the console and have some parameters available.
Hi
Can you elaborate on how to achieve this? using editor and Forms, how?
What would be the process like?
I mean, I am using the @annotatios for my script to have parameters, but that only works in the console.
In the 'Script Editor', the Dynamic Forms with the parameters defined in the script do not appear in the page as fields. I am assuming this is because of the reason bellow.
Also you can not execute a script saved in the Script Editor. So I would need to copy into the console, for the fields to appear and script to be executed...or is there any other way?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have just found the way, I believe this is what you meant.
If you save the script and then go in the console, you can search for it in the console, as File and there you can see the parameters and execute the script.
I believe this will do the trick.
Thanks
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.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.