Skip to content

Commit

Permalink
Fix version update requires list of downstream versions
Browse files Browse the repository at this point in the history
  • Loading branch information
marko-bekhta committed Nov 19, 2024
1 parent cd699e3 commit 9f6116b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ public JiraVersion fixVersion(JiraVersion version, boolean force) {
try {
if (force) {
return destFixVersions.compute(version.name, (name, current) -> upsert(project, projectGroupContext,
destinationJiraClient, version, List.of()));
destinationJiraClient, version, destinationJiraClient().versions(project.projectKey())));
} else {
return destFixVersions.computeIfAbsent(version.name,
name -> upsert(project, projectGroupContext, destinationJiraClient, version, List.of()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,19 @@ public void registerManagementRoutes(@Observes ManagementInterface mi) {
context.submitTask(context::refreshFixVersions);
rc.end();
});
mi.router().get("/sync/fix-versions/:project/:versionId").blockingHandler(rc -> {
String project = rc.pathParam("project");
String versionId = rc.pathParam("versionId");

HandlerProjectContext context = contextPerProject.get(project);

if (context == null) {
throw new IllegalArgumentException("Unknown project '%s'".formatted(project));
}

context.fixVersion(context.sourceJiraClient().version(Long.parseLong(versionId)), true);
rc.end();
});
}

/**
Expand Down

0 comments on commit 9f6116b

Please sign in to comment.