mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-12 20:57:45 +02:00
Update doneStates of existing kanban cards (#625)
Signed-off-by: Ilya Sumbatyants <ilya.sumb@gmail.com>
This commit is contained in:
@@ -51,5 +51,19 @@ export const taskOperation: MigrateOperation = {
|
||||
} else {
|
||||
console.log('Task: => public project Kanban is ok')
|
||||
}
|
||||
|
||||
const outdatedTasks = (await client.findAll(task.class.Task, {}))
|
||||
.filter((x) => x.doneState === undefined)
|
||||
|
||||
await Promise.all(
|
||||
outdatedTasks.map(async (task) => {
|
||||
console.info('Upgrade task:', task._id)
|
||||
try {
|
||||
await ops.updateDoc(task._class, task.space, task._id, { doneState: null })
|
||||
} catch (err: unknown) {
|
||||
console.error(err)
|
||||
}
|
||||
})
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user