feat(FN-3953): enable tracking issue creation on task edit and document the
Implements GitHub tracking issue creation on PATCH operations for FN-3953, with accompanying test coverage and documentation updates for edit-time tracking. Fusion-Task-Id: FN-3953
This commit is contained in:
@@ -1804,6 +1804,22 @@ export function registerTaskWorkflowRoutes(ctx: ApiRoutesContext, deps: TaskWork
|
||||
}
|
||||
|
||||
const task = await scopedStore.updateTask(req.params.id, updates);
|
||||
|
||||
const manualUnlinkRequested =
|
||||
hasBodyField("githubTracking") &&
|
||||
validatedGithubTracking !== null &&
|
||||
typeof validatedGithubTracking === "object" &&
|
||||
validatedGithubTracking.issue === null;
|
||||
|
||||
if (hasBodyField("githubTracking") && !manualUnlinkRequested) {
|
||||
await maybeCreateTaskTrackingIssue(scopedStore, task, options?.githubToken);
|
||||
const refreshedTask = await scopedStore.getTask(req.params.id, {
|
||||
activityLogLimit: TASK_DETAIL_ACTIVITY_LOG_LIMIT,
|
||||
});
|
||||
res.json(trimTaskDetailActivityLog(refreshedTask));
|
||||
return;
|
||||
}
|
||||
|
||||
res.json(task);
|
||||
} catch (err: unknown) {
|
||||
if (err instanceof ApiError) {
|
||||
|
||||
Reference in New Issue
Block a user