xebialabs-community/xlr-jira-extension-plugin

Unable to import JIRA

Opened this issue · 0 comments

I am trying to import the JIRA library from Python however it always fails… are we forced to use the JiraService wrapper provided by XL Release ?
I would like to do a simple thing like this

import re
from jira import JIRA

jira_server = "https://mydira"
jira_user = "dasdasd"
jira_password = "dasddasd"

jira_server = {'server': jira_server}
jira = JIRA(options=jira_server, basic_auth=(jira_user, jira_password))

# Get an issue.
issue = jira.issue("ISSUE-4928")

issue.fields.labels.append(u"TESTING")
issue.update(fields={"labels": issue.fields.labels})

Instead of having to do the low level operations using json objects via http requests, it would allow to have cleaner code that is more maintainable… any idea why when I try to run the plugin it returns

Exception during execution:
ImportError: cannot import name JIRA in <script> at line number 9

I have JIRA installed locally with PIP and I can run the commands from a separate python program… I am wondering what is failing as an XLR plugin. From what I was able to tell the XLR Jira Plugin creates a wrapper to Jira.