Skip to content

Gayatri/fix volunteer count mismatch - #2312

Open
sawantgayatri19 wants to merge 8 commits into
developmentfrom
gayatri/fix-volunteer-count-mismatch
Open

Gayatri/fix volunteer count mismatch#2312
sawantgayatri19 wants to merge 8 commits into
developmentfrom
gayatri/fix-volunteer-count-mismatch

Conversation

@sawantgayatri19

Copy link
Copy Markdown

Description
This PR resolves a discrepancy between the "Team Stats" volunteer count and the broader "Volunteer Status" active user pool by updating the getTeamMembersCount helper function. Previously, overly restrictive filters (weeklycommittedHours and role) were causing a mismatch in organization summary metrics.

Related PRs (if any):
This is a backend PR for resolving organization report metrics.

Main changes explained:

  • Updated src/helpers/overviewReportHelper.js to remove restrictive base filters (weeklycommittedHours and role) from getTeamMembersCount.
  • Aligned team member counting logic with the broader active organization summary pool.
  • Ensured total calculations accurately evaluate active users across the organization without omitting eligible members.

How to test:

  1. Check out to the current branch: git checkout gayatri/fix-volunteer-count-mismatch
  2. Run npm install to ensure all dependencies are up to date.
  3. Start your backend server locally.
  4. Log in as an admin user.
  5. Navigate to the dashboard or reports section to review the Total Org Summary / Team Stats metrics.
  6. Verify that the volunteer count under "Team Stats" correctly matches the broader active user pool without being artificially restricted.

Screenshots or videos of changes:
Attach screenshots showing the updated metrics matching properly

Screenshot 2026-08-20 at 12 18 16 PM Screenshot 2026-08-20 at 12 20 01 PM Note: Ensure database indexes and connection strings are properly configured if testing with a fresh local dataset.

@iAbhi001
iAbhi001 self-requested a review August 23, 2026 01:53
…ndDate query params and direct issueDate filtering behavior
… bmGetInjuryIssue, bmDeleteInjuryIssue, bmRenameInjuryIssue, bmCopyInjuryIssue) to close SonarCloud coverage gap
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
75.7% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@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 28, 2026

@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 PR locally. Verified the updated Team Stats values against the API response — In Team: 1,015 and Not In Team: 1,612 match the usersInTeamStats response. The Volunteer Status section also matches the volunteerstats API response.

I noticed the overall Team Stats total (2,627) differs from the Volunteer Status total (2,564); however, these sections may represent different user populations based on the updated calculation logic. No UI/API mismatch was observed within the respective sections during testing.

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.

4 participants