Fixed existing issues present in Total Org Summary - #5489
Conversation
✅ Deploy Preview for highestgoodnetwork-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
There was a problem hiding this comment.
🟡 Changes recommended
The subtitle text/fields currently mix different metrics and labeling, which conflicts with the stated expected “Total Logged Hours” behavior and can mislead users.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR updates the Total Org Summary → Hours Completed visualization to make the Tasks vs Projects breakdown clearer and to align bar-label percentages with the underlying “share of total hours” metric.
Changes:
- Switch bar-label percentage calculations from
submittedToCommittedHoursPercentagetopercentageOfTotalso bar percentages match the total split. - Add a Projects percentage to the subtitle so both categories are visible together.
File summaries
| File | Description |
|---|---|
| src/components/TotalOrgSummary/HoursCompleted/HoursCompletedBarChart.jsx | Updates percentage calculations for bar labels and extends the subtitle to include Projects. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| {(() => { | ||
| const raw = data.projectHours.percentageOfTotal ?? 0; | ||
| const normalized = raw > 1 ? raw : raw * 100; | ||
| const formatted = `${normalized.toFixed(1)}%`; | ||
| return ` | ${formatted} of Committed Hours (Projects)`; |
iAbhi001
left a comment
There was a problem hiding this comment.
Request Changes: Application Crash on Total Org Summary
Hi @Adit0717,
I tested this PR locally alongside the backend PR (OneCommunityGlobal/HGNRest#2328), but encountered a runtime crash ("Something went wrong" error boundary) when navigating to the Total Org Summary page.
Steps to Reproduce:
- Checked out frontend branch
Aditya_fix_bug_totalorgsummary_hours_tasks_mismatchand backend PR branch#2328. - Cleared site data/cache and logged in as an Admin user.
- Navigated to Dashboard → Total Org Summary → Volunteer Workload and Task Completion Analysis.
- The page immediately hit the error boundary screen.
Error Details / Console Output:



Description
Related PRS (if any):
This frontend PR is related to the #2328 backend PR.
…
Main changes explained:
…
How to test:
a. With the date range 6/26/2026 – 8/21/2026, the subtitle should read something like x% of Total Logged Hours (Tasks) | y% of Total Logged Hours (Projects) - both values visible, not just Tasks.
b. The percentage in parentheses on each bar should match the footer split. Previously bars showed (0.00%) and (1.00%) while the footer showed 31.3% and 68.7%. After the fix, the bar labels should show the correct percentages respectively not 0% or 1%.
c. Previously showed 1275 completed tasks for the date range 6/26/2026 – 8/21/2026. After the fix, re-run with the same date range and verify the count drops significantly to a number that is realistic for that ~2 month window.
The tester flagged that 1275 tasks against 25.32 hours works out to ~0.02 hours per task, which is unrealistic. The fixed count should be the correct number for the selected period.