Skip to content

fix: persist add-reminder date (send under reminder, not reminder_date) - #58

Open
nico-fioretti wants to merge 1 commit into
democratize-technology:mainfrom
nico-fioretti:fix/persist-reminder-date
Open

fix: persist add-reminder date (send under reminder, not reminder_date)#58
nico-fioretti wants to merge 1 commit into
democratize-technology:mainfrom
nico-fioretti:fix/persist-reminder-date

Conversation

@nico-fioretti

Copy link
Copy Markdown

Problem

add-reminder reports success but the reminder is stored with a zero date (0001-01-01T00:00:00Z), so it never fires.

The Vikunja task model exposes an absolute reminder under the reminder key, but TaskReminder and the reminder write path use reminder_date. The server ignores the unknown reminder_date field and leaves reminder at its zero value.

Verified against Vikunja v2.3.0: add-reminder with a valid date produced reminders: [{ "reminder": "0001-01-01T00:00:00Z" }] on a subsequent get.

Fix

addReminder now reads and writes the reminder field (preserving any existing reminders, including relative ones) and casts the body for updateTask, which forwards it verbatim. After the change the same call persists the real date (e.g. reminder: "2028-02-28T09:00:00+01:00").

Tests

Adds tests/reminder-persistence.test.ts: asserts the update body sends reminder and never reminder_date, and that existing reminders are preserved.

Note

There is a sibling bug in the assignee path (the bulk-assign endpoint responds 2xx but does not persist on current servers; assigning via the single-assignee endpoint works). That is the same area #34/#43 touch from the detection angle, so it is intentionally left out of this PR to keep the reminder fix self-contained.

An absolute reminder must be sent under the reminder key. The TaskReminder type calls it reminder_date, but the server expects reminder and otherwise stores a zero (0001-01-01) reminder that never fires. Reads/writes the reminder field and preserves existing reminders.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants