feat(FN-3185): preserve progress on task reset with explicit confirmation d
This merge implements a "preserve progress" option for task resets across the system. FN-3185 adds a `preserveProgress` flag to `moveTask` that keeps status/history when resetting tasks back to `todo`, with required explicit confirmation dialogs to prevent accidental resets. The feature is wired thr Fusion-Task-Id: FN-3185
This commit is contained in:
@@ -354,10 +354,22 @@ export function batchUpdateTaskModels(
|
||||
});
|
||||
}
|
||||
|
||||
export function moveTask(id: string, column: Column, projectId?: string): Promise<Task> {
|
||||
export function moveTask(
|
||||
id: string,
|
||||
column: Column,
|
||||
projectId?: string,
|
||||
optionsOrPosition?: { preserveProgress?: boolean } | number,
|
||||
): Promise<Task> {
|
||||
return api<Task>(withProjectId(`/tasks/${id}/move`, projectId), {
|
||||
method: "POST",
|
||||
body: JSON.stringify({ column }),
|
||||
body: JSON.stringify({
|
||||
column,
|
||||
...(
|
||||
typeof optionsOrPosition === "object" && optionsOrPosition?.preserveProgress
|
||||
? { preserveProgress: true }
|
||||
: {}
|
||||
),
|
||||
}),
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user