From 98b7cc9254ebf2c50d721fcc23aee104b4887e4e Mon Sep 17 00:00:00 2001 From: kolaente Date: Thu, 14 Mar 2024 15:44:31 +0100 Subject: [PATCH] feat(views): do not override filters in view --- pkg/models/task_collection.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/models/task_collection.go b/pkg/models/task_collection.go index 78709f535..0c34d1a54 100644 --- a/pkg/models/task_collection.go +++ b/pkg/models/task_collection.go @@ -177,7 +177,11 @@ func (tf *TaskCollection) ReadAll(s *xorm.Session, a web.Auth, search string, pa return nil, 0, 0, err } - tf.Filter = view.Filter + if tf.Filter != "" { + tf.Filter = "(" + tf.Filter + ") && (" + view.Filter + ")" + } else { + tf.Filter = view.Filter + } } taskopts, err := getTaskFilterOptsFromCollection(tf)