[WEB-3477] fix: mutation issue on moving work items for a manually ended cycle (#6696)
This commit is contained in:
parent
6ac28ad614
commit
80198f5fda
1 changed files with 6 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue