Skip to content

Instantly share code, notes, and snippets.

@danielbloom
Created August 16, 2018 02:02
Show Gist options
  • Save danielbloom/afcc9be7001422e48d3f36b20d46530f to your computer and use it in GitHub Desktop.
Save danielbloom/afcc9be7001422e48d3f36b20d46530f to your computer and use it in GitHub Desktop.
Get relevant ticket data
def get_ticket_data(issue):
fields = issue['fields']
ticket = {}
ticket['key'] = issue['key']
ticket['summary'] = fields['summary']
ticket['status'] = fields['status']['name']
if fields['timeestimate'] is None:
ticket['timeestimate'] = 0
else:
ticket['timeestimate'] = int(fields['timeestimate']) / 3600
return ticket
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment