Skip to content

Diya 🔥 fix(report): Fixed Weekly Summary Report#2156

Merged
one-community merged 1 commit intodevelopmentfrom
Diya_Fix_WeeklySummaryReport
Apr 8, 2026
Merged

Diya 🔥 fix(report): Fixed Weekly Summary Report#2156
one-community merged 1 commit intodevelopmentfrom
Diya_Fix_WeeklySummaryReport

Conversation

@DiyaWadhwani
Copy link
Copy Markdown
Contributor

Description

Fixes a bug where the "Three Weeks Ago" tab in the Weekly Summaries report was not displaying any summary data, even when a summary existed in the database.

Related PRs (if any):

N/A

Main changes explained:

  • Updated formatSummaries in reportHelper.js to dynamically map weekly summary entries to their correct week index using getTheWeek, replacing hardcoded logic that only handled week indices 0, 1, and 2. Week 3 entries were previously silently dropped before reaching the API response.

How to test:

  1. Check out the current branch
  2. Run npm install and start the server
  3. Clear site data/cache
  4. Log in as an admin user
  5. Navigate to Reports → Weekly Summaries
  6. Select the Three Weeks Ago tab
  7. Verify that a user who submitted a summary three weeks ago has it displayed correctly
  8. Update the summary from three weeks ago for your logged-in user if needed to verify

Screenshots or videos of changes:

WeeklySummaryReport.mp4

Note:

The root cause was in formatSummaries — the function only handled week indices 0–2, so any entry with a dueDate belonging to week 3 was mapped to nothing and returned as an empty array in the API response.

@one-community one-community changed the title Diya fix(report): Fixed Weekly Summary Report Diya 🔥 fix(report): Fixed Weekly Summary Report Apr 8, 2026
@one-community one-community merged commit 0562cfa into development Apr 8, 2026
2 checks passed
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 8, 2026

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.

2 participants