ccsync icon indicating copy to clipboard operation
ccsync copied to clipboard

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

Open ShivaGupta-14 opened this issue 11 months ago • 3 comments

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

https://github.com/user-attachments/assets/cd2f1eb4-76b9-47e5-8df8-cca89ec10148

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

  • [X] I want to work on this issue.

ShivaGupta-14 avatar Dec 26 '25 18:12 ShivaGupta-14

Hi @its-me-abhishek! I want to clarify a point in chart should we add "Overdue" as a third category in the Reports chart alongside "Completed" and "Ongoing"? I almost done all core implementation.

ShivaGupta-14 avatar Dec 27 '25 15:12 ShivaGupta-14

Sounds to be a good idea! Though I'd suggest to create another issue for that, as the scopes will be different.

its-me-abhishek avatar Dec 27 '25 18:12 its-me-abhishek

@its-me-abhishek Okay, then I’ll open a PR for this. After solving this issue, I’ll create another issue and a PR for that as well. :)

ShivaGupta-14 avatar Dec 28 '25 05:12 ShivaGupta-14