mirror of
https://github.com/makeplane/plane.git
synced 2025-12-25 08:09:33 +01:00
[WEB-3477] fix: mutation issue on moving work items for a manually ended cycle (#6696)
This commit is contained in:
@@ -179,7 +179,9 @@ export class CycleStore implements ICycleStore {
|
||||
const endDate = getDate(c.end_date);
|
||||
const hasEndDatePassed = endDate && isPast(endDate);
|
||||
const isEndDateToday = endDate && isToday(endDate);
|
||||
return c.project_id === projectId && hasEndDatePassed && !isEndDateToday && !c?.archived_at;
|
||||
return (
|
||||
c.project_id === projectId && ((hasEndDatePassed && !isEndDateToday) || c.status?.toLowerCase() === "completed")
|
||||
);
|
||||
});
|
||||
completedCycles = sortBy(completedCycles, [(c) => c.sort_order]);
|
||||
const completedCycleIds = completedCycles.map((c) => c.id);
|
||||
@@ -195,7 +197,9 @@ export class CycleStore implements ICycleStore {
|
||||
let incompleteCycles = Object.values(this.cycleMap ?? {}).filter((c) => {
|
||||
const endDate = getDate(c.end_date);
|
||||
const hasEndDatePassed = endDate && isPast(endDate);
|
||||
return c.project_id === projectId && !hasEndDatePassed && !c?.archived_at;
|
||||
return (
|
||||
c.project_id === projectId && !hasEndDatePassed && !c?.archived_at && c.status?.toLowerCase() !== "completed"
|
||||
);
|
||||
});
|
||||
incompleteCycles = sortBy(incompleteCycles, [(c) => c.sort_order]);
|
||||
const incompleteCycleIds = incompleteCycles.map((c) => c.id);
|
||||
|
||||
Reference in New Issue
Block a user