Skip to content

Instantly share code, notes, and snippets.

@danielbloom
Created August 16, 2018 02:07
Show Gist options
  • Save danielbloom/2299289f635bb2bfa18b28c242b25774 to your computer and use it in GitHub Desktop.
Save danielbloom/2299289f635bb2bfa18b28c242b25774 to your computer and use it in GitHub Desktop.
Loop through issues and group by assignee
...
for issue in jira_data['issues']:
ticket = get_ticket_data(issue)
assignee = issue['fields']['assignee']['emailAddress']
if assignee not in assignments:
assignments[assignee] = []
assignments[assignee].append(ticket)
count += len(jira_data['issues'])
if count >= int(jira_data['total']):
return assignments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment