Skip to content

fix(aufgaben): keep a typed timer on a Dringlichkeit change, reset it after adding - #673

Merged
DeepDiver1975 merged 1 commit into
mainfrom
fix/658-task-timer-default
Oct 19, 2026
Merged

DeepDiver1975 merged 1 commit into
mainfrom
fix/658-task-timer-default

Conversation

@DeepDiver1975

Copy link
Copy Markdown
Contributor

Fixes #658

Problem

Two problems with the Aufgaben timer, in both the quick-add form and the task dialog:

  • Changing the Dringlichkeit always rewrote the timer with its default (5/15/30 minutes), so a timer the Lagebuchführer had typed was lost without notice.
  • Adding a task cleared only the text, so a typed timer silently carried into the next task, which then fired at a time nobody chose.

Change

  • TasksViewModel.OnNewUrgencyChanged and TaskDialogViewModel.OnUrgencyChanged now use the (oldValue, newValue) overload. They rewrite the timer only while it is empty or still holds the old Dringlichkeit's default. A typed value survives.
  • TasksViewModel.AddTask and TaskDialogViewModel.SaveAndCreateAnother reset the timer to the default of the sticky Dringlichkeit. The Dringlichkeit itself stays sticky, as before.

A typed value that happens to equal the current default is treated as the default. Nothing on screen tells the two apart, so this needs no extra state.

Tests (written first)

TasksViewModelTests and TaskDialogViewModelTests each get four tests:

  • an untouched timer follows the Dringlichkeit;
  • a typed timer survives a Dringlichkeit change;
  • an emptied timer takes the new default;
  • adding (quick-add) or "SPEICHERN & WEITEREN TASK" (dialog) resets a typed timer to the default.

Before the fix, "survives" and "resets" failed in both view models. Changing_urgency_resets_minutes_but_override_survives_until_next_change pinned the old overwrite and is replaced.

No UI change, so no screenshots. make clean ci and make format-check pass locally.

🤖 Generated with Claude Code

… after adding

Changing the Dringlichkeit always rewrote the timer with its default,
so a timer the Lagebuchführer had typed was lost without notice. Adding
a task cleared only the text, so a typed timer silently carried into
the next task, which then fired at a time nobody chose.

In both the quick-add form and the task dialog, a Dringlichkeit change
now rewrites the timer only while it is empty or still holds the old
Dringlichkeit's default. After adding, or after "SPEICHERN & WEITEREN
TASK", the timer goes back to the default of the sticky Dringlichkeit.

Fixes #658

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
@DeepDiver1975
DeepDiver1975 merged commit e1fa995 into main Oct 19, 2026
11 checks passed
@DeepDiver1975
DeepDiver1975 deleted the fix/658-task-timer-default branch October 19, 2026 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Aufgaben: a typed timer sticks into the next task, and a Dringlichkeit change overwrites it silently

1 participant