Skip to content

Sohail: Total Org Summary - Mentor Count Logic Not Aligned with Leaderboard#2048

Open
sohailuddinsyed wants to merge 1 commit intodevelopmentfrom
Sohail-mentor-count-mismatch-with-leaderbaord-total
Open

Sohail: Total Org Summary - Mentor Count Logic Not Aligned with Leaderboard#2048
sohailuddinsyed wants to merge 1 commit intodevelopmentfrom
Sohail-mentor-count-mismatch-with-leaderbaord-total

Conversation

@sohailuddinsyed
Copy link
Contributor

@sohailuddinsyed sohailuddinsyed commented Feb 15, 2026

Description

Total Org Summary - Mentor Count Logic Not Aligned with Leaderboard (WIP Sohail Uddin Syed)

a. Owner Login → Reports → Total Org Summary / Leaderboard

b. The Mentor count in Total Org Summary does not match the Leaderboard values and overall HGN page totals.

c. On the Leaderboard, the count includes mentor-tagged users, volunteers with zero logged hours, and users with no activity during the selected period, all of whom are being aggregated together.

d. In Total Org Summary, the Mentor metric currently appears to count only mentor-tagged users, excluding zero-hour and inactive users that are included in the Leaderboard totals.

e. The Mentor count in Total Org Summary should mirror the Leaderboard logic by including mentor-tagged users plus volunteers with zero hours and inactive users, so that values remain consistent across both views.

Related PRS (if any):

No front end PR needed.

Main changes explained:

The Mentor count in Reports → Total Org Summary did not match the dashboard's "0 hrs Totals: X Members" value (showed 82 vs expected 41), causing confusion during validation.

Root Cause: The two queries used different filtering criteria:

  • Dashboard "0 hrs Totals" counts users with weeklycommittedHours === 0 (strict equality to numeric zero)
  • Reports "Mentors" was counting users with role === 'Mentor' and filtering by createdDate
  • The dashboard logic is implemented in the frontend (Leaderboard.jsx:757) where it filters: filteredUsers.filter(user => user.weeklycommittedHours === 0)

Changes Made:

  • Updated the mentors query in src/helpers/overviewReportHelper.js to match dashboard logic
  • Added detailed comments explaining the logic and frontend references for future maintainability

How to test:

  1. Check into current branch
  2. Do npm install and npm run dev to run this PR locally
  3. Clear site data/cache
  4. Log in as owner user
  5. Go to Reports → Total Org Summary → Volunteer Status
  6. Note the "Mentors" count value
  7. Go to Dashboard → Leaderboard
  8. Note the "0 hrs Totals: X Members" value
  9. Verify that both counts match

Screenshots or videos of changes:

Screenshot 2026-02-14 221225 Screenshot 2026-02-14 221138

@sohailuddinsyed sohailuddinsyed changed the title Total Org Summary - Mentor Count Logic Not Aligned with Leaderboard Sohail: Total Org Summary - Mentor Count Logic Not Aligned with Leaderboard Feb 15, 2026
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.

1 participant