1
0

fix(kanban): Make sure all saved taskBucket positions are saved with their project view id

When the tasks were migrated from belonging directly to a bucket to only belonging to a view, I forgot to add the view in that migration, resulting in task buckets where the view was 0. These entries were not deleted when a task was moved between buckets, but the new task bucket relation nevertheless inserted. This resulted in tasks showing up multiple times on the kanban board.

This change adds a new migration which adds the correct project view id (as derived from the bucket) and fixes the old migration as well.

Resolves https://community.vikunja.io/t/no-longer-able-to-properly-move-tasks-between-kanban-columns/2175
This commit is contained in:
kolaente
2024-04-06 13:04:36 +02:00
parent e0417c8bda
commit 7b8fab33a5
2 changed files with 86 additions and 2 deletions

View File

@ -78,8 +78,9 @@ func init() {
if view.ViewKind == 3 { // Kanban view
pos := taskBuckets20240315110428{
TaskID: task.ID,
BucketID: task.BucketID,
TaskID: task.ID,
BucketID: task.BucketID,
ProjectViewID: view.ID,
}
_, err = tx.Insert(pos)