From 6733ac4e225ec6b75f680c6a69c4ec8e8020236b Mon Sep 17 00:00:00 2001 From: kolaente Date: Wed, 18 Feb 2026 17:04:35 +0100 Subject: [PATCH] test: add task #47 with reminders outside window for bug #2245 Add a second reminder to task 2 (in 2019, outside the test window) and create task #47 with two reminders that straddle the test window (2018-08-01 and 2019-03-01) but neither falls inside it. This exposes the multi-row matching bug where separate EXISTS subqueries can match different rows in the same sub-table. --- pkg/db/fixtures/task_reminders.yml | 19 +++++++++++++++++++ pkg/db/fixtures/tasks.yml | 8 ++++++++ 2 files changed, 27 insertions(+) diff --git a/pkg/db/fixtures/task_reminders.yml b/pkg/db/fixtures/task_reminders.yml index 75f31fd90..4f500df52 100644 --- a/pkg/db/fixtures/task_reminders.yml +++ b/pkg/db/fixtures/task_reminders.yml @@ -16,3 +16,22 @@ task_id: 40 reminder: 2023-03-04 15:00:00 created: 2018-12-01 01:12:04 +# Task 2 already has one reminder at 2018-12-01 01:13:44 (id 3). +# Add a second reminder for task 2 that is far outside the range used by +# the "filtered reminder dates" test (2018-10-01 to 2018-12-10). +# This second reminder is in 2019, well after the upper bound. +- id: 5 + task_id: 2 + reminder: 2019-06-01 12:00:00 + created: 2018-12-01 01:12:04 +# Task 47: two reminders, neither inside the (2018-10-01, 2018-12-10) window +# Reminder before the window: +- id: 6 + task_id: 47 + reminder: 2018-08-01 12:00:00 + created: 2018-12-01 01:12:04 +# Reminder after the window: +- id: 7 + task_id: 47 + reminder: 2019-03-01 12:00:00 + created: 2018-12-01 01:12:04 diff --git a/pkg/db/fixtures/tasks.yml b/pkg/db/fixtures/tasks.yml index 2937f4601..b17b5b76a 100644 --- a/pkg/db/fixtures/tasks.yml +++ b/pkg/db/fixtures/tasks.yml @@ -412,3 +412,11 @@ due_date: 2023-03-01 15:00:00 created: 2018-12-01 01:12:04 updated: 2018-12-01 01:12:04 +- id: 47 + title: 'task #47 with reminders outside window' + done: false + created_by_id: 1 + project_id: 1 + index: 32 + created: 2018-12-01 01:12:04 + updated: 2018-12-01 01:12:04