Код: Выделить всё
jql_string = 'project = xyz AND assignee in (larry, curly, moe) ORDER BY key DESC'
fields = "Key, Summary, Assignee, Created, Updated)"
# Instantiate the Jira instance
jira = JIRA(server="https://myserver.mycompany.com/",
token_auth="abcd1234") # JIRA Personal access token
# Write the issues to a dictionary
for issues in jira.search_issues(jql_str=jql_string,fields=fields,startAt=0, maxResults=False):
issue = jira.issue(issues.key)
issueList.append(
{'Issue Type' : issue.fields.issuetype,
'Issue key' : issue.key,
'Issue id' : issue.id,
'Summary' : issue.fields.summary,
'Assignee' : issue.fields.assignee,
'Updated' : issue.fields.updated,
'Severity' : issue.fields.customfield_12825
}
# Write out data frame
.....
Код: Выделить всё
# Get environment variables
jql_string = os.environ.get('JQL_STRING')
token = os.environ.get('JIRA_USER_TOKEN')
server = os.environ.get('JIRA_SERVER')
and pass through code as shown above...
Подробнее здесь: https://stackoverflow.com/questions/790 ... n-jira-api