1
0

fix(kanban): make sure tasks which changed their done status are moved around in buckets

This fixes a bug where tasks which had their done status changed were not moved in the correct bucket. This affected both frontend and api. The move of the task between buckets is now correctly done in the api and frontend - with a bit of duplicated logic between the two. This could be optimized further in the future.

Resolves https://kolaente.dev/vikunja/vikunja/issues/2610
This commit is contained in:
kolaente
2024-07-18 12:39:00 +02:00
parent 34691b8edf
commit 12474e5be6
6 changed files with 134 additions and 28 deletions

View File

@ -625,7 +625,6 @@ import {scrollIntoView} from '@/helpers/scrollIntoView'
import {useAttachmentStore} from '@/stores/attachments'
import {useTaskStore} from '@/stores/tasks'
import {useKanbanStore} from '@/stores/kanban'
import {useBaseStore} from '@/stores/base'
import {useTitle} from '@/composables/useTitle'
@ -651,7 +650,6 @@ const router = useRouter()
const {t} = useI18n({useScope: 'global'})
const projectStore = useProjectStore()
const baseStore = useBaseStore()
const attachmentStore = useAttachmentStore()
const taskStore = useTaskStore()
const kanbanStore = useKanbanStore()
@ -888,14 +886,6 @@ async function toggleTaskDone() {
newTask,
toggleTaskDone,
)
if(task.value.done) {
baseStore.currentProject?.views.forEach(v => {
if (v.doneBucketId !== 0) {
kanbanStore.moveTaskToBucket(task.value, v.doneBucketId)
}
})
}
}
async function changeProject(project: IProject) {