From a93f6bf1603bb4db7acdbdb3bb8f8358bec750bd Mon Sep 17 00:00:00 2001 From: kolaente Date: Wed, 18 Feb 2026 21:56:57 +0100 Subject: [PATCH] test: add OR-joined reminder filter regression test Verify that OR-joined conditions on the same sub-table still produce separate EXISTS subqueries and match independently, as expected. --- pkg/models/task_collection_test.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pkg/models/task_collection_test.go b/pkg/models/task_collection_test.go index 0b7f1e4d8..178058ac7 100644 --- a/pkg/models/task_collection_test.go +++ b/pkg/models/task_collection_test.go @@ -1131,6 +1131,18 @@ func TestTaskCollection_ReadAll(t *testing.T) { want: []*Task{}, wantErr: false, }, + { + name: "filtered reminder dates with OR should match independently", + fields: fields{ + Filter: "reminders > '2019-01-01T00:00:00+00:00' || reminders < '2018-09-01T00:00:00+00:00'", + }, + args: defaultArgs, + want: []*Task{ + task2, // has reminder at 2019-06-01 (> 2019-01-01) + task47, // has reminder at 2019-03-01 (> 2019-01-01) and 2018-08-01 (< 2018-09-01) + }, + wantErr: false, + }, { name: "filter in keyword", fields: fields{