Sohail: Total Org Summary - Mentor Count Logic Not Aligned with Leaderboard#2048
Open
sohailuddinsyed wants to merge 1 commit intodevelopmentfrom
Open
Sohail: Total Org Summary - Mentor Count Logic Not Aligned with Leaderboard#2048sohailuddinsyed wants to merge 1 commit intodevelopmentfrom
sohailuddinsyed wants to merge 1 commit intodevelopmentfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
weeklycommittedHours === 0(strict equality to numeric zero)role === 'Mentor'and filtering bycreatedDatefilteredUsers.filter(user => user.weeklycommittedHours === 0)Changes Made:
src/helpers/overviewReportHelper.jsto match dashboard logicHow to test:
npm installandnpm run devto run this PR locallyScreenshots or videos of changes: