Skip to content

Deep - Fix - Volunteer status pie chart#1759

Merged
one-community merged 4 commits intodevelopmentfrom
deep-fix-volunteer-status-pie-chart
Dec 9, 2025
Merged

Deep - Fix - Volunteer status pie chart#1759
one-community merged 4 commits intodevelopmentfrom
deep-fix-volunteer-status-pie-chart

Conversation

@deep3072
Copy link
Copy Markdown
Contributor

@deep3072 deep3072 commented Sep 28, 2025

Description

Added a new pie chart to show Total Mentors next to Total Volunteer pie chart

Screenshot 2025-09-27 at 23 25 34

Related PRS (if any):

To test this backend PR you need to checkout the #4138 frontend PR.

Main changes explained:

  • Added mentor statistics to the existing volunteer analytics flow: getVolunteerStatsData now calls a new helper for mentor counts and returns a mentorNumberStats block alongside the volunteer numbers (reportsController.js).
  • Built getMentorNumberStats in overviewReportHelper.js; it mirrors the volunteer aggregation but filters role: 'Mentor', counting Active/New/Deactivated mentors and computing percentages plus optional comparison deltas.
  • Exposed getMentorNumberStats in the helper’s export so other code can consume the same mentor breakdown whenever needed.

How to test:

  1. Check into deep-fix-volunteer-status-pie-chart branch in the backend.
  2. Check into deep-fix-volunteer-status-pie-chart branch in frontend and run it to test.
  3. Run npm install, and ... to run this PR locally.
  4. Clear site data/cache.
  5. Log in as Admin user.
  6. Go to dashboard→ Reports→ Total Org Summary
  7. Verify if the Total Mentors Chart is properly loaded or not.
  8. Verify the count is changing as per date filters.

Screenshots or videos of changes:

Before:

Screen.Recording.2025-09-28.at.14.46.46.mov

After:

Screen.Recording.2025-09-28.at.14.41.37.mov

@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 Oct 1, 2025
@ChiragBellara
Copy link
Copy Markdown
Contributor

Reviewed the working of PR #1759
The API's work as expected and the screen loads with all the correct information.
Screen and Charts load as expected

Also, added relevant comments to the frontend PR #4138

Copy link
Copy Markdown

@laynet laynet left a comment

Choose a reason for hiding this comment

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

Reviewed PR #1759. I followed the testing instructions and logged in as admin user running the frontend with PR #4138. The graph loads as expected and displays the correct data when the date filters are used with a significant lag. I’ve also reviewed the frontend.
PR 1759

Copy link
Copy Markdown
Contributor

@akshith312 akshith312 left a comment

Choose a reason for hiding this comment

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

Provided Feedback on related FE PR 4138.

Copy link
Copy Markdown
Contributor

@laharinandipati laharinandipati left a comment

Choose a reason for hiding this comment

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

Working as expected. Checked the frontend. No rendering needed
PR_1759

Copy link
Copy Markdown

@Aswin20010 Aswin20010 left a comment

Choose a reason for hiding this comment

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

Tested the new Mentor Status Pie Chart under Reports → Total Org Summary. Verified data rendering from mentorNumberStats, correct alignment beside the volunteer chart, and consistent count updates based on date filters. Confirmed the connector lines and pill-shaped callouts render correctly using externalLabelGuidesPlugin.js. Checked layout spacing, responsiveness, and dark mode — all functioning as expected. Approved the Frontend and related Backend PR.

Screenshot 2025-10-16 at 12 56 35 PM Screenshot 2025-10-16 at 12 59 14 PM

Copy link
Copy Markdown
Contributor

@Aditya-gam Aditya-gam left a comment

Choose a reason for hiding this comment

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

  • Reviewed this PR by testing the frontend on localhost and left a review requesting changes on the frontend PR #4138.
  • Backend properly returns the data to the client site, but there is an issue with data aggregation.
  • New mentors who remain active are counted twice: once in "active" AND once in "new," inflating the total and making percentages misleading (e.g., 3 new active mentors → counted as 6 in the total).
Image
  • This same issue exists for the volunteer status donut chart too, and I have tried to fix it in these PRs: #4191 + #1794
  • Test Video:
TestVideo.mov

@one-community
Copy link
Copy Markdown
Member

Thank you all, merging!

@deep3072
Copy link
Copy Markdown
Contributor Author

deep3072 commented Dec 8, 2025

  • Backend properly returns the data to the client site, but there is an issue with data aggregation.

Hi @Aditya-gam, good observation. I've made the changes. Thanks

@one-community one-community merged commit 8bd2171 into development Dec 9, 2025
2 checks passed
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.

8 participants