I am integrating Jira with another system and want to call a local python script during a close transition on an Jira issue.
How can I invoke the local script using scriptrunner? The python script is in a local directory on my Jira server.
Additionally, I'd like to be able to pass an argument(close reason) to the python script, if possible. Can I do that with scriptrunner?
A very blunt approach (which will try to run anything you want)
def thingToRun = "Command (including parameters) to run".execute()
thingToRun.waitForOrKill(x)
x being the number of milliseconds to let it run before killing it as a suspected zombie (I think it's milliseconds, been a while since I used it)
Then you can interrogate thingToRun.exitValue() to see what the return code was.
Thanks Nic
I can't get this to work at all.... I was wondering if you could help. I can put the absolute path location on the linux server where Jira server is hosted and it can't find file/folder. I've also tried to add the file to the JIRA_Home/scripts directory with same result... (and several other areas).
So, I would like to pull the offenseID and a custom_field(closing reason) and pass that to the script.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Could you try running an "ls /absolute/path/to/script" for the directory the script is stored in, and returning the exit value?
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.