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:
@ -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) {
|
||||
|
Reference in New Issue
Block a user