Add Date Filter Support for Volunteer Activity Trend and Volunteers by Location (#179)#224
Open
PamalaMadhumithaYadav wants to merge 1 commit into
Open
Conversation
25 tasks
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.
Summary
Implemented Issue #179 by adding date filter support for the Volunteer Activity Trend and Volunteers by Location widgets in
volunteer_application_analytics.py. These filters are consumed by the Super Admin dashboard charts.Changes
build_date_filter_trend()helper — returns the WHERE clause date condition for Volunteer Activity Trend queriesbuild_date_filter_location()helper — returns the WHERE clause date condition for Volunteers by Location queryget_grouping()helper — determines daily vs monthly grouping based on time rangeget_volunteer_activity_trend()to support 7D, 30D, 1Y, All, and Custom date filtersget_volunteers_by_location()to support 7D, 30D, 1Y, All, and Custom date filters (date filtering only — country aggregation logic and response format unchanged)monthtoperiodperiodtime_rangevstime_range_location, with separate custom date params)Date Filter Behavior
Testing
sql/folder loaded into SQLite (per local testing guidelines)periodkey in all trend responses and cumulativetotal_volunteerscountsNotes for Reviewers
LOCAL_TESTINGflag is set toFalsefor deployment; whenTrue, the script runs against local CSV data for testing without AWS access