Skip to content

Gayatri - Fix Total Org Summary volunteer donut chart inflation - #5454

Open
sawantgayatri19 wants to merge 7 commits into
developmentfrom
Gayatri-Fix-Volunteer-Inflation
Open

Gayatri - Fix Total Org Summary volunteer donut chart inflation#5454
sawantgayatri19 wants to merge 7 commits into
developmentfrom
Gayatri-Fix-Volunteer-Inflation

Conversation

@sawantgayatri19

Copy link
Copy Markdown

Description
Please include the exact bug/functionality description and a summary of the changes/ related issues. Please also include any other relevant motivation and context:
Fixed a high-priority bug on the Total Org Summary dashboard where the center count for the "TOTAL VOLUNTEERS*" donut chart was inflated (showing 2560 instead of 2514). The inflation was caused by "New Active" members being double-counted and mentor metrics being improperly added into the general volunteer pool. This fix ensures "New Active" is strictly counted as a non-overlapping segment, isolates mentors to their dedicated chart, and explicitly computes totalVolunteers in VolunteerStatusChart.jsx as the sum of visible segments (existingActive + newActive + deactivated).
Fixes # (P1 Total Org Summary: TOTAL VOLUNTEERS* donut chart center count double-counts New Active and wrongly adds Mentors)

Related PRS (if any):
This frontend PR is related to backend overview report helper logic updates for proper metric categorization.
To test this PR, ensure you are on the corresponding backend/frontend branch setup.

Main changes explained:
Update backend helper logic in overviewReportHelper.js to ensure active volunteers, new active volunteers, and mentors are mutually exclusive and correctly filtered.

Update src/components/TotalOrgSummary/VolunteerStatus/VolunteerStatusChart.jsx to dynamically compute totalVolunteers strictly from the sum of segment counts (existingActive + newActive + deactivated).

Verify that the mentor chart strictly operates on independent mentorNumberStats and that footnote guidelines remain accurate.

How to test:

  1. check into current branch (Gayatri-Fix-Volunteer-Inflation)
  2. do npm install and npm run dev to run this PR locally
  3. Clear site data/cache (perform a hard refresh with Cmd + Shift + R or Ctrl + Shift + R)
  4. log as admin user
  5. go to dashboard → Total Org Summary (/totalorgsummary)
  6. verify function “TOTAL VOLUNTEERS*” center count matches the exact sum of the active, new, and deactivated segments (2505 + 9 + 0 = 2514) (feel free to include screenshot here)
  7. verify this new feature works in dark mode

Screenshots or videos of changes:
Screenshot 2026-08-20 at 1 22 15 AM

Note:
This is an urgent P1 fix for the Total Org Summary dashboard to resolve metric discrepancies before review.

@netlify

netlify Bot commented Aug 20, 2026

Copy link
Copy Markdown

Deploy Preview for highestgoodnetwork-dev ready!

Name Link
🔨 Latest commit f2e0edf
🔍 Latest deploy log https://app.netlify.com/projects/highestgoodnetwork-dev/deploys/6a8e26398c47a00008337183
😎 Deploy Preview https://deploy-preview-5454--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.

@one-community one-community changed the title Fix Total Org Summary volunteer donut chart inflation Gayatri - Fix Total Org Summary volunteer donut chart inflation Aug 22, 2026
@one-community one-community added the High Priority - Please Review First This is an important PR we'd like to get merged as soon as possible label Aug 22, 2026
@iAbhi001
iAbhi001 self-requested a review August 23, 2026 02:22

@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.

Hi @sawantgayatri19,

Thanks for working on this fix! I pulled your branch locally to test the changes, but I was unable to view the Total Org Summary dashboard because navigating to /totalorgsummary results in a Page Not Found (404) error.

Additionally, the branch currently has merge conflicts with the development branch (notably around src/routes.jsx), which is causing routing/syntax issues and failing automated tests.

Please rebase/merge the latest development branch into your branch, resolve the merge conflicts, and ensure the route /totalorgsummary loads as expected so we can complete testing.

Image Image

RuthwikHM
RuthwikHM previously approved these changes Aug 24, 2026

@RuthwikHM RuthwikHM 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.

Tested this out locally and the total count in the middle matches the sum of the individual segements in the Donut chart. Thanks for fixing this!

Image

@sonarqubecloud

Copy link
Copy Markdown

@sawantgayatri19

Copy link
Copy Markdown
Author

@iAbhi001 Thanks for catching that — you were right, the branch had fallen behind development and the merge conflicts in src/routes.jsx were causing the 404 and the test failures.

I've since:

Merged the latest development into this branch and resolved all conflicts (including src/routes.jsx, yarn.lock, package-lock.json)
Fixed the routing so /totalorgsummary and the other affected routes load correctly
Fixed the failing unit tests — all 2253 tests pass locally and all CI checks are now green

Could you pull the latest changes on this branch and re-test when you get a chance? /totalorgsummary should load as expected now.

@DeepighaJ DeepighaJ 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.

Tested the Total Org Summary page with my user account. The Total Volunteers center count correctly matches the sum of the displayed volunteer status segments: 2515 Existing Active + 6 New Active + 0 Deactivated = 2521 Total Volunteers. The displayed total is consistent with the segment values, and no discrepancy was observed.

Image

@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.

Hi @sawantgayatri19,

Thanks for resolving the merge conflicts and updating the branch!

I pulled the latest changes and tested the /totalorgsummary page locally:

  • The route /totalorgsummary loads as expected without any 404 errors.
  • The "TOTAL VOLUNTEERS*" donut chart center count is now computed dynamically and accurately reflects the sum of the visible segments: 2515 Existing Active + 6 New Active + 0 Deactivated = 2521 Total Volunteers.
  • No inflation or double-counting was observed, and the mentor stats remain properly isolated.

LGTM! Approving the changes.

Image Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

High Priority - Please Review First This is an important PR we'd like to get merged as soon as possible

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants