Skip to content

Instantly share code, notes, and snippets.

@fty4
Created April 22, 2020 12:07
Show Gist options
  • Save fty4/c46c3d6bfd3e20d81c96fcfa23869649 to your computer and use it in GitHub Desktop.
Save fty4/c46c3d6bfd3e20d81c96fcfa23869649 to your computer and use it in GitHub Desktop.
Output CSV of Jira changelog issues
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