I am trying to create python scripts in script-runner but I am unable to figure out how to return values to the UI or to a log file so I can validate that my script is functioning as intended. Here is a very basic example script which which works for both groovy and python, but returns no information in python.:
Groovy:
import com.atlassian.jira.ComponentManager
import com.atlassian.jira.issue.Issue
def cmgr = ComponentManager.getInstance()
def issue = cmgr.getIssueManager().getIssueObject("PROJ-431")
return issue.key
Python:
from com.atlassian.jira import ComponentManager
import com.atlassian.jira.issue.Issue
cmgr = ComponentManager.getInstance()
issue = cmgr.getIssueManager().getIssueObject("PROJ-431")
print issue.key
Can someone point me in the right direction to get output from the python interpretor, either through log4j, which I am unable to load in the python interpretor or just as a return value in script-runner UI?