Repository navigation
Gayatri -fix: add committed hours stats to total org summary - #2388
Merged
one-community merged 2 commits intoOct 10, 2026
Merged
Conversation
|
mahikakakkad
approved these changes
Oct 10, 2026
mahikakakkad
left a comment
There was a problem hiding this comment.
Tested locally with frontend #5623 on dev data, Current and Previous Week.
✅ The Weekly Committed Hours chart now renders.
✅ TOTAL VOLUNTEERS (2,585) matches the Active Volunteers card.
✅ The legend reads 0-10, 11-20, 21-30, 31-40, Over 40 hrs.
✅ Same result on both weeks.
Approving.
Member
|
Thank you all, merging! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Description
Fixes the blank "Weekly Committed Hours" chart on Total Org Summary, which showed "TOTAL VOLUNTEERS 0" and no chart on both Current Week and Previous Week.
Fixes # (bug list priority urgent: P1 Total Org Summary "Weekly Committed Hours" chart is blank)
The frontend chart reads
volunteerCommittedHoursStatsfrom the volunteer stats API, but the backend never returned that field, so the chart always received no data. The original backend implementation (commit cd8f5e9 onsaisandeep_fix_incorrect_volunteer_hours_backend) was never merged into development.Related PRS (if any):
This backend PR is related to frontend PR #5623 (hours bucket labels).
To test this backend PR, check out frontend PR #5623. The chart also renders with frontend
development, but the bucket labels are only correct with #5623.Main changes explained:
src/helpers/overviewReportHelper.js: addedgetCommittedHoursStats(), which groups active volunteers (committed hours ≥ 1, role not Mentor, the same population as the Active Volunteers card) byweeklycommittedHoursinto buckets'10','20','30','40','40+'. Bucket ids are upper limits ('10'= 1–10 hrs,'20'= 11–20,'30'= 21–30,'40'= 31–40,'40+'= over 40), matching the frontend labels.src/controllers/reportsController.js: calls the new helper and returnsvolunteerCommittedHoursStatsin the response.How to test:
gayatri/fix-weekly-committed-hours-be) and run the backendnpm installandnpm startScreenshots or videos of changes:
Note:
Committed hours reflect each volunteer's current
weeklycommittedHours, so this chart is the same for any selected date range. Backend tests foroverviewReportHelperandreportsControllerpass.