From e940db6d32d595d1ec71a8393c65bb36c04ae7fa Mon Sep 17 00:00:00 2001 From: kolaente Date: Tue, 19 Mar 2024 13:55:28 +0100 Subject: [PATCH] fix(views): return only tasks when the bucket id was already specified --- pkg/models/task_collection.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/models/task_collection.go b/pkg/models/task_collection.go index 7a677cd5c..7ba25c51e 100644 --- a/pkg/models/task_collection.go +++ b/pkg/models/task_collection.go @@ -19,6 +19,7 @@ package models import ( "code.vikunja.io/api/pkg/user" "code.vikunja.io/web" + "strings" "xorm.io/xorm" ) @@ -120,7 +121,7 @@ func getTaskFilterOptsFromCollection(tf *TaskCollection, projectView *ProjectVie } func getTaskOrTasksInBuckets(s *xorm.Session, a web.Auth, projects []*Project, view *ProjectView, opts *taskSearchOptions) (tasks interface{}, resultCount int, totalItems int64, err error) { - if view != nil { + if view != nil && !strings.Contains(opts.filter, "bucket_id") { if view.BucketConfigurationMode != BucketConfigurationModeNone { tasksInBuckets, err := GetTasksInBucketsForView(s, view, projects, opts, a) return tasksInBuckets, len(tasksInBuckets), int64(len(tasksInBuckets)), err