Skip to content
Permalink
Browse files
456: Read value of resolved in build properly when considering backports
Reviewed-by: ehelin
  • Loading branch information
rwestberg committed Jul 30, 2020
1 parent 7de9db7 commit 233758ef9b266a6f6c831f574547c0e20e9c2420
@@ -72,8 +72,8 @@ static Optional<JdkVersion> mainFixVersion(Issue issue) {
log.warning("Issue " + issue.id() + " has multiple valid fixVersions - ignoring");
return Optional.empty();
}
if (issue.properties().containsKey("customfield_10006")) {
return Optional.of(JdkVersion.parse(versionString.get(0), issue.properties().get("customfield_10006").asString()));
if (issue.properties().containsKey("customfield_10006") && issue.properties().get("customfield_10006").isObject()) {
return Optional.of(JdkVersion.parse(versionString.get(0), issue.properties().get("customfield_10006").get("value").asString()));
} else {
return Optional.of(JdkVersion.parse(versionString.get(0)));
}
@@ -175,7 +175,7 @@ private void setVersion(Issue issue, String version) {
}
issue.setProperty("fixVersions", JSON.array().add(version));
if (!resolvedInBuild.isEmpty()) {
issue.setProperty("customfield_10006", JSON.of(resolvedInBuild));
issue.setProperty("customfield_10006", JSON.object().put("value", resolvedInBuild));
}
}

1 comment on commit 233758e

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented on 233758e Jul 30, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.