port 'Resolution' as a label (#73)
diff --git a/migration/src/jira2github_import.py b/migration/src/jira2github_import.py
index e7c4080..eefc59e 100644
--- a/migration/src/jira2github_import.py
+++ b/migration/src/jira2github_import.py
@@ -57,6 +57,7 @@
subtasks = extract_subtasks(o)
pull_requests = extract_pull_requests(o)
jira_labels = extract_labels(o)
+ resolution = extract_resolution(o)
reporter_gh = account_map.get(reporter_name)
reporter = f"{reporter_dispname} (@{reporter_gh})" if reporter_gh else f"{reporter_dispname}"
@@ -192,6 +193,8 @@
logger.error(f"Unknown Component: {c}")
for label in jira_labels:
labels.append(f"legacy-jira-label:{label}")
+ if resolution:
+ labels.append(f"legacy-jira-resolution:{resolution}")
data = {
"issue": {
diff --git a/migration/src/jira_util.py b/migration/src/jira_util.py
index d939f3d..89841e1 100644
--- a/migration/src/jira_util.py
+++ b/migration/src/jira_util.py
@@ -46,6 +46,13 @@
return environment if environment else ""
+def extract_resolution(o: dict) -> Optional[str]:
+ resolution = o.get("fields").get("resolution")
+ if resolution:
+ return resolution.get("name")
+ return None
+
+
def extract_reporter(o: dict) -> tuple[str, str]:
reporter = o.get("fields").get("reporter")
name = reporter.get("name", "") if reporter else ""