Skip to content

Commit

Permalink
Merge pull request #14 from d3b-center/feature/as/json_output
Browse files Browse the repository at this point in the history
✨ output ticket ids in json format
  • Loading branch information
sickler-alex authored Sep 5, 2024
2 parents a3aa8bf + f433c1c commit 3c672ec
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 6 additions & 5 deletions d3b_dff_cli/modules/jira/create_ticket.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,6 @@ def get_transfer_key(epic_key, headers, jira_url):

query_data = json.loads(response.data)

print(query_url)

# loop through fields to find transfer ticket
for issue in query_data["issues"]:
if "Data Transfer - " in issue["fields"]["summary"]:
Expand Down Expand Up @@ -352,13 +350,16 @@ def main(args):
project_id, issue_type_id, fields, args.post, args.prd, args.jira_url, headers
)

output_json = None

if args.post:
if args.issue_type == "Data Intake Epic":
transfer_key = get_transfer_key(ticket_key, headers, args.jira_url)
print(f"Data Intake Epic ID: {ticket_key}")
print(f"Transfer Ticket ID: {transfer_key}")
output_json = {"Epic ID": ticket_key, "Transfer Ticket ID": transfer_key}

else:
print(f"Ticket ID: {ticket_key}")
output_json = f"Ticket ID: {ticket_key}"

print(json.dumps(output_json, indent=4, sort_keys=True))

return
2 changes: 1 addition & 1 deletion d3b_dff_cli/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '2.0.0'
__version__ = '2.0.1'

0 comments on commit 3c672ec

Please sign in to comment.