1
0

fix(filter): make sure tasks are in a correct bucket and position when they are part of a date filter

Whenever a task is part of a date filter, it might fall in or out of a filter bucket without anything changing, other than the current time. For example, a filter condition like due_date > now may include different tasks depending on the current time.
For these kinds of tasks to properly show up in the kanban view of a filter, there has to be an entry in the task_buckets table. These entries only got updated when either a task was updated or the filter itself was updated. To account for th changing of time, we also need to check periodically if tasks are now part or not anymore part of that filter.
This change adds a cron task to do precisely that.
We'll have to see if this works resource-wise, but the cron is not the only one doing a bunch of sql queries so it might be fine after all.

Resolves https://community.vikunja.io/t/tasks-in-saved-filter-appear-in-list-view-but-are-not-visible-in-kanban-view/2800

(cherry picked from commit bc52da4029170bfd10cddea28cf5c6983969cb42)
This commit is contained in:
kolaente
2024-09-19 11:19:48 +02:00
parent d27b62db6e
commit 62c238e4bc
3 changed files with 168 additions and 2 deletions

View File

@ -415,6 +415,6 @@ func RegisterOldExportCleanupCron() {
})
if err != nil {
log.Fatalf("Could not old export cleanup cron: %s", err)
log.Fatalf("Could not register old export cleanup cron: %s", err)
}
}