Skip to content

fix: deactivated volunteers count respects time filter#2067

Open
roshini1212 wants to merge 1 commit intodevelopmentfrom
roshini_fix_deactivated_volunteers_filter
Open

fix: deactivated volunteers count respects time filter#2067
roshini1212 wants to merge 1 commit intodevelopmentfrom
roshini_fix_deactivated_volunteers_filter

Conversation

@roshini1212
Copy link

Description

Deactivated Volunteers in Total Org Summary showed historical total instead of respecting selected time filter.

Fixes # (bug list priority HIGH Yagna: Deactivated Volunteers Count Not getting reflected with Time Filter)

Related PRs (if any):

Backend-only PR. No frontend changes needed.

Main changes explained:

  • Update src/helpers/overviewReportHelper.js:
    • OLD: createdDate: { $lte: isoEndDate } (all historical inactives)
    • NEW: lastModifiedDate: { $gte: isoStartDate, $lte: isoEndDate } (only recent deactivations)

How to test:

  1. Checkout this branch
  2. npm install && npm start (backend restart required)
  3. Clear site data/cache
  4. Login as Owner → Reports → Total Org Summary
  5. Test these ranges:
Date Range Deactivated Volunteers
2026-02-18 → 2026-02-24 49
2026-02-24 → 2026-02-24 0

Screenshots or videos of changes:

Before fix (same count regardless of dates):
Screenshot 2026-02-24 at 15 18 57

After fix (changes with date range):
Screenshot 2026-02-24 at 15 41 19
Screenshot 2026-02-24 at 15 41 54

Screen.Recording.2026-02-24.at.15.49.15.mov

Note:

  • Single aggregation change, no schema changes
  • Frontend unchanged - automatically uses corrected backend data
  • Tested locally with Owner login

Fixes Total Org Summary showing historical deactivations instead of selected range
@sonarqubecloud
Copy link

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