Hi,
In JIRA at present for some validations, I wrote some JavaScripts under custom fields. But now I have a requirement that I need to replace all of them with python scripts. But I'm new to python. How can I connect to JIRA through python ? How to run Python scripts from JIRA?
Thanks in advance,
Saiibabu
Community moderators have prevented the ability to post new answers.
Hi,
I solved the problem by using the Add-on Script runner in Jira. There I created a scripted field in Groovy and called the command prompt and run the python script from there. Here is a simple example of the script
def process = ['cmd', '/c', 'filepathToPython.exe', 'filepathToPythonFile.py'].execute()
process.waitfor()
return p.text
process?.err?.text can be used instead of process.text if one want to see eventual error messages.
is there no need to install python on prod server? i want to write a one python file like mypythonfile.py . where i need to place the file? How the file will run?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You may also try Jira Scripting Suite.
https://marketplace.atlassian.com/plugins/com.quisapps.jira.jss/server/overview
It allows you to execute custom Jython script to evaluate workflow conditions, perform validations and post functions. Script is evaluated in the context, which differs for each type of script (see sections below for details).Jython is a Python port to Java. Also go through http://quisapps.com/confluence/display/JSS/Scripting+Samples for some example 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.