Skip to content

Fixed existing issues present in Total Org Summary - #5489

Open
Adit0717 wants to merge 1 commit into
developmentfrom
Aditya_fix_bug_totalorgsummary_hours_tasks_mismatch
Open

Fixed existing issues present in Total Org Summary#5489
Adit0717 wants to merge 1 commit into
developmentfrom
Aditya_fix_bug_totalorgsummary_hours_tasks_mismatch

Conversation

@Adit0717

@Adit0717 Adit0717 commented Sep 1, 2026

Copy link
Copy Markdown

Description

Screenshot 2026-09-01 at 2 20 02 PM

Related PRS (if any):

This frontend PR is related to the #2328 backend PR.

Main changes explained:

  1. Updated HoursCompletedBarChart.jsx to display the Projects percentage alongside the Tasks percentage in the subtitle, so both categories are visible together.
  2. Updated HoursCompletedBarChart.jsx to use percentageOfTotal instead of submittedToCommittedHoursPercentage for the bar label calculations. percentageOfTotal represents each category's share of total logged hours and always sums to 100%, making the bar labels consistent with the footer breakdown.

How to test:

  1. check out to the current branch
  2. do npm install and run this PR locally
  3. Clear site data/cache
  4. log as admin user
  5. go to Dashboard → Total Org Summary → Volunteer Workload and Task Completion Analysis → Hours Completed / Task Completed charts → Date range selected: 6/26/2026 - 8/21/2026
  6. verify the following.,
    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.

Copilot AI lite review requested due to automatic review settings September 1, 2026 21:51
@netlify

netlify Bot commented Sep 1, 2026

Copy link
Copy Markdown

Deploy Preview for highestgoodnetwork-dev ready!

Name Link
🔨 Latest commit c4c8b19
🔍 Latest deploy log https://app.netlify.com/projects/highestgoodnetwork-dev/deploys/6a9748f888ec920008514a19
😎 Deploy Preview https://deploy-preview-5489--highestgoodnetwork-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@sonarqubecloud

sonarqubecloud Bot commented Sep 1, 2026

Copy link
Copy Markdown

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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 submittedToCommittedHoursPercentage to percentageOfTotal so 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.

Comment on lines +194 to +198
{(() => {
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
iAbhi001 self-requested a review September 6, 2026 05:12

@iAbhi001 iAbhi001 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

  1. Checked out frontend branch Aditya_fix_bug_totalorgsummary_hours_tasks_mismatch and backend PR branch #2328.
  2. Cleared site data/cache and logged in as an Admin user.
  3. Navigated to Dashboard → Total Org Summary → Volunteer Workload and Task Completion Analysis.
  4. The page immediately hit the error boundary screen.

Error Details / Console Output:

Image Image

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.

3 participants