Skip to content

Bug: Reports charts always show 0 and weekly range is incorrect #322

@ShivaGupta-14

Description

@ShivaGupta-14

Describe the bug
The Reports feature charts are not displaying data correctly. Charts show 0 counts for all periods (Daily, Weekly, Monthly) even when there are completed and pending tasks. Additionally, the Weekly report uses an incorrect date range calculation.

To Reproduce
Steps to reproduce the behavior:

  1. Go to http://localhost:5173/home
  2. Ensure you have tasks with various statuses (completed, pending)
  3. Click "Show Reports" button
  4. See that all charts display 0 for both "Completed" and "Ongoing"
  5. Weekly report label says "This Week" but actually calculates last 7 days

Expected behavior

  • Charts should correctly display the count of completed and ongoing tasks for each period
  • Weekly report should show tasks from the start of the current week (Sunday) to today
  • Completed tasks should be counted by their end date, not modified date

Video

Screen.Recording.2025-12-25.at.3.07.06.PM.mov

Root cause

  1. Taskwarrior dates use format 20241215T130000Z which was not being parsed correctly
  2. Weekly calculation used sevenDaysAgo instead of startOfWeek
  3. Task filtering used modified date instead of end date for completed tasks

Desktop (please complete the following information):

  • OS: macOS

  • Browser: Chrome

  • Version: Latest

  • I want to work on this issue.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions