From 2dcf6c68616c963ed1fd64a2204640c9db9dc467 Mon Sep 17 00:00:00 2001 From: kolaente Date: Wed, 20 Mar 2024 11:36:46 +0100 Subject: [PATCH] fix(kanban): do not use the bucket id saved on the task --- frontend/src/router/index.ts | 1 - frontend/src/stores/kanban.ts | 15 --------------- 2 files changed, 16 deletions(-) diff --git a/frontend/src/router/index.ts b/frontend/src/router/index.ts index a5f94d45c..364339611 100644 --- a/frontend/src/router/index.ts +++ b/frontend/src/router/index.ts @@ -348,7 +348,6 @@ const router = createRouter({ name: 'project.index', redirect(to) { const viewId = getProjectViewId(Number(to.params.projectId as string)) - console.log(viewId) if (viewId) { console.debug('Replaced list view with', viewId) diff --git a/frontend/src/stores/kanban.ts b/frontend/src/stores/kanban.ts index 05d51e4a1..b54294290 100644 --- a/frontend/src/stores/kanban.ts +++ b/frontend/src/stores/kanban.ts @@ -131,11 +131,6 @@ export const useKanbanStore = defineStore('kanban', () => { const bucket = buckets.value[b] bucket.tasks[t] = task - if (bucket.id !== task.bucketId) { - bucket.tasks.splice(t, 1) - addTaskToBucketAndSort(buckets.value, task) - } - buckets.value[b] = bucket found = true @@ -144,15 +139,6 @@ export const useKanbanStore = defineStore('kanban', () => { } } - for (const b in buckets.value) { - if (buckets.value[b].id === task.bucketId) { - findAndUpdate(b) - if (found) { - return - } - } - } - for (const b in buckets.value) { findAndUpdate(b) if (found) { @@ -198,7 +184,6 @@ export const useKanbanStore = defineStore('kanban', () => { if ( bucketIndex === null || - buckets.value[bucketIndex]?.id !== task.bucketId || taskIndex === null || (buckets.value[bucketIndex]?.tasks[taskIndex]?.id !== task.id) ) {