Port 'Environment' custom field (#69)
diff --git a/migration/src/jira2github_import.py b/migration/src/jira2github_import.py
index 8e9779c..be07d4b 100644
--- a/migration/src/jira2github_import.py
+++ b/migration/src/jira2github_import.py
@@ -43,6 +43,7 @@
description = extract_description(o).strip()
status = extract_status(o)
issue_type = extract_issue_type(o)
+ environment = extract_environment(o)
(reporter_name, reporter_dispname) = extract_reporter(o)
(assignee_name, assignee_dispname) = extract_assignee(o)
created = extract_created(o)
@@ -105,6 +106,9 @@
elif created_datetime.date() != updated_datetime.date():
body += f", updated {updated_datetime.strftime('%b %d %Y')}"
+ if environment:
+ body += f'\nEnvironment:\n```\n{environment}\n```\n'
+
if len(attachment_list_items) > 0:
body += f'\nAttachments: {", ".join(attachment_list_items)}'
diff --git a/migration/src/jira_util.py b/migration/src/jira_util.py
index 934b206..49bfdf7 100644
--- a/migration/src/jira_util.py
+++ b/migration/src/jira_util.py
@@ -41,6 +41,11 @@
return issuetype.get("name", "") if issuetype else ""
+def extract_environment(o: dict) -> str:
+ environment = o.get("fields").get("environment", "")
+ return environment if environment else ""
+
+
def extract_reporter(o: dict) -> tuple[str, str]:
reporter = o.get("fields").get("reporter")
name = reporter.get("name", "") if reporter else ""