vikunja/pkg/models
kolaente 62c238e4bc
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 bc52da4029)
2024-09-20 14:27:26 +02:00
..
api_routes.go feat(api): add bulk endpoints to api tokens 2024-06-18 14:33:57 +02:00
api_tokens.go chore(web): move web handler package to Vikunja 2024-09-20 14:22:08 +02:00
api_tokens_rights.go chore(web): move web handler package to Vikunja 2024-09-20 14:22:08 +02:00
api_tokens_test.go chore(deps): update golangci-lint rules 2023-12-19 13:34:31 +01:00
bulk_task.go chore(web): move web handler package to Vikunja 2024-09-20 14:22:08 +02:00
bulk_task_test.go chore: remove year from copyright headers 2023-09-01 08:32:28 +02:00
error.go fix(subscriptions): cleanup and simplify fetching subscribers for tasks and projects logic 2024-09-20 14:22:37 +02:00
events.go chore(web): move web handler package to Vikunja 2024-09-20 14:22:08 +02:00
export.go fix(filter): make sure tasks are in a correct bucket and position when they are part of a date filter 2024-09-20 14:27:26 +02:00
favorites.go chore(web): move web handler package to Vikunja 2024-09-20 14:22:08 +02:00
kanban.go fix: reset id before creating 2024-09-20 14:26:51 +02:00
kanban_rights.go chore(web): move web handler package to Vikunja 2024-09-20 14:22:08 +02:00
kanban_task_bucket.go chore(web): move web handler package to Vikunja 2024-09-20 14:22:08 +02:00
kanban_task_bucket_test.go fix(kanban): use correct assertion in the test 2024-07-12 14:21:46 +02:00
kanban_test.go fix(tasks): tests 2024-06-18 13:48:09 +02:00
label.go fix(label): ignore existing ID during creation 2024-09-20 14:25:39 +02:00
label_rights.go chore(web): move web handler package to Vikunja 2024-09-20 14:22:08 +02:00
label_task.go fix(labels): trigger task updated for bulk label task update 2024-09-20 14:27:19 +02:00
label_task_rights.go chore(web): move web handler package to Vikunja 2024-09-20 14:22:08 +02:00
label_task_test.go fix(labels): test error assertion 2024-09-20 14:22:09 +02:00
label_test.go chore(web): move web handler package to Vikunja 2024-09-20 14:22:08 +02:00
link_sharing.go fix: reset id before creating 2024-09-20 14:26:51 +02:00
link_sharing_rights.go chore(web): move web handler package to Vikunja 2024-09-20 14:22:08 +02:00
link_sharing_test.go chore(deps): update golangci-lint rules 2023-12-19 13:34:31 +01:00
listeners.go fix(task): cleanup old task positions and task buckets when adding an updated or created task to filter 2024-09-20 14:27:23 +02:00
main_test.go chore: remove year from copyright headers 2023-09-01 08:32:28 +02:00
mentions.go chore: remove year from copyright headers 2023-09-01 08:32:28 +02:00
mentions_test.go chore(deps): update golangci-lint rules 2023-12-19 13:34:31 +01:00
message.go chore: remove year from copyright headers 2023-09-01 08:32:28 +02:00
models.go feat(views)!: move done and default bucket setting to view 2024-03-19 00:47:47 +01:00
notifications.go fix(notifications): only sanitze html content in notifications, do not convert it to markdown 2024-04-07 13:34:53 +02:00
notifications_database.go chore(web): move web handler package to Vikunja 2024-09-20 14:22:08 +02:00
project.go fix(project): reset id before creating 2024-09-20 14:25:57 +02:00
project_duplicate.go chore(web): move web handler package to Vikunja 2024-09-20 14:22:08 +02:00
project_duplicate_test.go fix(views): duplicate all views and related entities when duplicating a project 2024-03-19 00:47:51 +01:00
project_rights.go chore(web): move web handler package to Vikunja 2024-09-20 14:22:08 +02:00
project_team.go fix: reset id before creating 2024-09-20 14:26:51 +02:00
project_team_rights.go chore(web): move web handler package to Vikunja 2024-09-20 14:22:08 +02:00
project_team_test.go chore(web): move web handler package to Vikunja 2024-09-20 14:22:08 +02:00
project_test.go fix(views): stable assertion for bucket in tests 2024-03-19 17:27:03 +01:00
project_users.go fix: reset id before creating 2024-09-20 14:26:51 +02:00
project_users_rights.go chore(web): move web handler package to Vikunja 2024-09-20 14:22:08 +02:00
project_users_rights_test.go chore(web): move web handler package to Vikunja 2024-09-20 14:22:08 +02:00
project_users_test.go chore(web): move web handler package to Vikunja 2024-09-20 14:22:08 +02:00
project_view.go fix: reset id before creating 2024-09-20 14:26:51 +02:00
project_view_rights.go chore(web): move web handler package to Vikunja 2024-09-20 14:22:08 +02:00
reaction.go fix: reset id before creating 2024-09-20 14:26:51 +02:00
reaction_rights.go chore(web): move web handler package to Vikunja 2024-09-20 14:22:08 +02:00
reaction_test.go feat: emoji reactions for tasks and comments (#2196) 2024-03-12 19:25:58 +00:00
rights.go chore: remove year from copyright headers 2023-09-01 08:32:28 +02:00
saved_filters.go fix(filter): make sure tasks are in a correct bucket and position when they are part of a date filter 2024-09-20 14:27:26 +02:00
saved_filters_rights.go chore(web): move web handler package to Vikunja 2024-09-20 14:22:08 +02:00
saved_filters_test.go fix(tests): make filter tests work again 2024-03-09 19:06:35 +01:00
subscription.go fix: reset id before creating 2024-09-20 14:26:51 +02:00
subscription_rights.go chore(web): move web handler package to Vikunja 2024-09-20 14:22:08 +02:00
subscription_test.go fix(subscriptions): cleanup and simplify fetching subscribers for tasks and projects logic 2024-09-20 14:22:37 +02:00
task_assignees.go chore(web): move web handler package to Vikunja 2024-09-20 14:22:08 +02:00
task_assignees_rights.go chore(web): move web handler package to Vikunja 2024-09-20 14:22:08 +02:00
task_attachment.go fix(files): use absolute path everywhere 2024-09-20 14:25:02 +02:00
task_attachment_rights.go chore(web): move web handler package to Vikunja 2024-09-20 14:22:08 +02:00
task_attachment_test.go fix(files): use absolute path everywhere 2024-09-20 14:25:02 +02:00
task_collection.go fix(kanban): correctly paginate filtered kanban buckets 2024-09-20 14:26:39 +02:00
task_collection_filter.go fix(filters): trim spaces when parsing filter values 2024-07-11 12:20:32 +02:00
task_collection_filter_test.go fix(filters): trim spaces when parsing filter values 2024-07-11 12:20:32 +02:00
task_collection_sort.go feat(views): save view and position in Typesense 2024-03-19 00:47:47 +01:00
task_collection_sort_test.go fix(views): test assertions 2024-03-19 00:47:51 +01:00
task_collection_test.go chore(web): move web handler package to Vikunja 2024-09-20 14:22:08 +02:00
task_comment_rights.go chore(web): move web handler package to Vikunja 2024-09-20 14:22:08 +02:00
task_comments.go fix: reset id before creating 2024-09-20 14:26:51 +02:00
task_comments_test.go fix: tests 2024-01-28 11:52:16 +01:00
task_overdue_reminder.go fix(projects): load projects only one when fetching subscriptions for a bunch of projects at once 2024-03-02 14:27:11 +01:00
task_overdue_reminder_test.go chore(deps): update golangci-lint rules 2023-12-19 13:34:31 +01:00
task_position.go chore(web): move web handler package to Vikunja 2024-09-20 14:22:08 +02:00
task_relation.go fix: reset id before creating 2024-09-20 14:26:51 +02:00
task_relation_rights.go chore(web): move web handler package to Vikunja 2024-09-20 14:22:08 +02:00
task_relation_test.go fix(tasks): check for cycles during creation of task relations and prevent them 2024-02-10 13:30:41 +01:00
task_reminder.go fix(reminders): notify subscribed users as well 2024-09-20 14:22:41 +02:00
task_reminder_test.go chore(deps): update golangci-lint rules 2023-12-19 13:34:31 +01:00
task_search.go chore(web): move web handler package to Vikunja 2024-09-20 14:22:08 +02:00
tasks.go fix(view): correctly resolve bucket filter when paginating 2024-09-20 14:26:34 +02:00
tasks_rights.go chore(web): move web handler package to Vikunja 2024-09-20 14:22:08 +02:00
tasks_test.go fix(views): move bucket update to extra endpoint 2024-07-02 16:34:53 +02:00
team_members.go fix: reset id before creating 2024-09-20 14:26:51 +02:00
team_members_rights.go chore(web): move web handler package to Vikunja 2024-09-20 14:22:08 +02:00
team_members_test.go chore(deps): update golangci-lint rules 2023-12-19 13:34:31 +01:00
teams.go fix: reset id before creating 2024-09-20 14:26:51 +02:00
teams_rights.go chore(web): move web handler package to Vikunja 2024-09-20 14:22:08 +02:00
teams_rights_test.go chore(web): move web handler package to Vikunja 2024-09-20 14:22:08 +02:00
teams_test.go feat(teams): add public flags to teams to allow easier sharing with other teams (#2179) 2024-03-10 14:04:32 +00:00
typesense.go fix(tasks): make fetching tasks in buckets via typesense work 2024-04-13 17:52:47 +02:00
unit_tests.go fix(views): update test fixtures for new structure 2024-03-19 00:47:51 +01:00
unsplash.go chore: remove year from copyright headers 2023-09-01 08:32:28 +02:00
user_delete.go fix(projects): delete child projects when deleting a project 2023-12-01 17:27:40 +01:00
user_delete_test.go chore(deps): update golangci-lint rules 2023-12-19 13:34:31 +01:00
user_project.go chore: remove year from copyright headers 2023-09-01 08:32:28 +02:00
user_project_test.go chore: remove year from copyright headers 2023-09-01 08:32:28 +02:00
users.go chore(web): move web handler package to Vikunja 2024-09-20 14:22:08 +02:00
webhooks.go fix: reset id before creating 2024-09-20 14:26:51 +02:00
webhooks_rights.go chore(web): move web handler package to Vikunja 2024-09-20 14:22:08 +02:00