Created
April 22, 2020 12:07
-
-
Save fty4/c46c3d6bfd3e20d81c96fcfa23869649 to your computer and use it in GitHub Desktop.
Output CSV of Jira changelog issues
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from jira import JIRA | |
import sys | |
import json | |
import requests | |
import urllib3 | |
urllib3.disable_warnings() | |
JIRA_USERNAME="your-username" | |
JIRA_PASSWORD="your-password" | |
JIRA_URL="https://jira.example.org" | |
JIRA_PROJECT="your-projectkey" | |
options = { | |
'server': JIRA_URL, | |
'verify': False | |
} | |
jira = JIRA(options, basic_auth=(JIRA_USERNAME, JIRA_PASSWORD)) | |
issues = jira.search_issues("project=" + JIRA_PROJECT, expand='changelog') | |
print "issuekey;created;from;to" | |
for issue in issues: | |
for history in issue.changelog.histories: | |
for item in history.items: | |
if item.field == 'status': | |
print issue.key + ';' + history.created + ';' + item.fromString + ';' + item.toString |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment