Skip to content

fix: resync planned task timeSpent on manual task-time edit - #279

Merged
AdamJ merged 2 commits into
mainfrom
fix/planned-task-timespent-resync
Oct 19, 2026
Merged

AdamJ merged 2 commits into
mainfrom
fix/planned-task-timespent-resync

Conversation

@AdamJ

@AdamJ AdamJ commented Oct 19, 2026

Copy link
Copy Markdown
Owner

Summary

  • adjustTaskTime updated a day task's own duration but never called accumulatePlannedTaskTime, so manually editing the end time of a task pulled in from the task board left the linked planned task's timeSpent (and matching timeEntries duration) stale.
  • Fixed by calling accumulatePlannedTaskTime from adjustTaskTime whenever an end time is set.

Test plan

  • Added regression test: src/contexts/TimeTracking.test.tsx — "resyncs timeSpent after editing the ended task's time" (watched RED before the fix, GREEN after)
  • pnpm vitest run — 411 tests pass
  • pnpm eslint on changed files — clean
  • pnpm build — clean

🤖 Generated with Claude Code

AdamJ and others added 2 commits October 19, 2026 14:10
adjustTaskTime updated the day task's own duration but never called
accumulatePlannedTaskTime, so manually editing the end time of a task
pulled in from the task board left the planned task's timeSpent stale.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@github-actions github-actions Bot added documentation Improvements or additions to documentation frontend labels Oct 19, 2026
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying timetrackerpro with  Cloudflare Pages  Cloudflare Pages

Latest commit: ee59202
Status: ✅  Deploy successful!
Preview URL: https://1393a194.timetrackerpro.pages.dev
Branch Preview URL: https://fix-planned-task-timespent-r.timetrackerpro.pages.dev

View logs

@AdamJ AdamJ self-assigned this Oct 19, 2026
@AdamJ AdamJ added this to Timetraked Oct 19, 2026
@github-project-automation github-project-automation Bot moved this to Backlog in Timetraked Oct 19, 2026
@AdamJ AdamJ moved this from Backlog to In review in Timetraked Oct 19, 2026
@AdamJ
AdamJ merged commit 2a923c3 into main Oct 19, 2026
3 checks passed
@github-project-automation github-project-automation Bot moved this from In review to Done in Timetraked Oct 19, 2026
@AdamJ
AdamJ deleted the fix/planned-task-timespent-resync branch October 19, 2026 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation frontend

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant