Created
August 16, 2018 02:02
-
-
Save danielbloom/afcc9be7001422e48d3f36b20d46530f to your computer and use it in GitHub Desktop.
Get relevant ticket data
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
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