Dataverse Grid Filter Audit (Custom Filter Handler Candidates)
Scope: app/src/KMP/GridColumns/*.php and app/plugins/*/src/KMP/GridColumns/*.php.
Goal: identify filterable columns that do not map directly to a column on the primary table and therefore need a customFilterHandler (or equivalent join/queryField change).
Findings by Grid
MembersGridColumns (app/src/KMP/GridColumns/MembersGridColumns.php)
branch_id- Why flagged:
queryFieldpoints toBranches.name(association). Base query usescontain()only. - Data source:
Branches(belongsToMembers). - Recommendation: Needs handler or join. Prefer switching to
Members.branch_idif the filter values are IDs.
- Why flagged:
parent_id- Why flagged:
queryFieldpoints toParents.sca_name(association). Base query usescontain()only. - Data source:
Parents(self-relation). - Recommendation: Needs handler or join. Prefer switching to
Members.parent_idif the filter values are IDs.
- Why flagged:
warrantable- Why flagged: virtual/computed (no DB column). Auto-filter would generate
Members.warrantable. - Data source: computed in
Member::warrantableReview(). - Recommendation: Needs customFilterHandler to map to the correct eligibility logic.
- Why flagged: virtual/computed (no DB column). Auto-filter would generate
VerifyQueueGridColumns (app/src/KMP/GridColumns/VerifyQueueGridColumns.php)
branch_id- Why flagged:
queryFieldpoints toBranches.name(association). Base query usescontain()only. - Data source:
Branches(belongsToMembers). - Recommendation: Needs handler or join, or change to
Members.branch_id.
- Why flagged:
GatheringsGridColumns (app/src/KMP/GridColumns/GatheringsGridColumns.php)
branch_id- Why flagged:
queryFieldpoints toBranches.id(association). Base query usescontain()only. - Data source:
Branches(belongsToGatherings). - Recommendation: Needs handler or join, or change to
Gatherings.branch_id.
- Why flagged:
gathering_type_id- Why flagged:
queryFieldpoints toGatheringTypes.id(association). Base query usescontain()only. - Data source:
GatheringTypes(belongsToGatherings). - Recommendation: Needs handler or join, or change to
Gatherings.gathering_type_id.
- Why flagged:
activity_filter- Why flagged: filters on
GatheringActivities.id(BelongsToMany). - Data source:
GatheringActivitiesvia join table. - Recommendation: Probably OK because the base query already calls
leftJoinWith('GatheringActivities'). Keep an eye on this if the base query changes.
- Why flagged: filters on
GatheringAttendancesGridColumns (app/src/KMP/GridColumns/GatheringAttendancesGridColumns.php)
gathering_type- Why flagged:
queryFieldpoints toGatheringTypes.name(association). Base query usescontain()only. - Data source:
GatheringTypes(viaGatherings). - Recommendation: Needs handler or join.
- Why flagged:
start_date,end_date- Why flagged:
queryFieldpoints toGatherings.start_date/Gatherings.end_date(association). Base query usescontain()only. - Data source:
Gatherings(belongsToGatheringAttendances). - Recommendation: Needs handler or join (system views use these even when
canFilteris false).
- Why flagged:
MemberRolesGridColumns (app/src/KMP/GridColumns/MemberRolesGridColumns.php)
status- Why flagged: no
member_roles.statuscolumn. Status is derived from dates (ActiveWindow pattern). - Data source: computed via
ActiveWindowBaseEntitylogic. - Recommendation: Needs customFilterHandler that maps status → date window conditions.
- Why flagged: no
ActivitiesGridColumns (app/plugins/Activities/src/KMP/GridColumns/ActivitiesGridColumns.php)
activity_group_name- Why flagged: virtual property from
ActivityGroupassociation; no base column. - Data source:
ActivityGroups(belongsToActivities). - Recommendation: Needs customFilterHandler or change queryField to
Activities.activity_group_id(with ID-based filter values).
- Why flagged: virtual property from
MemberAuthorizationsGridColumns (app/plugins/Activities/src/KMP/GridColumns/MemberAuthorizationsGridColumns.php)
responded_on- Why flagged:
queryFieldpoints toCurrentPendingApprovals.responded_on(association). Base query usescontain()only. - Data source:
CurrentPendingApprovals(hasMany association). - Recommendation: Needs handler or join if filtering is ever enabled for this grid. (Currently
canFilteris false.)
- Why flagged:
OfficersGridColumns (app/plugins/Officers/src/KMP/GridColumns/OfficersGridColumns.php)
office_name- Why flagged:
queryFieldpoints toOffices.name(association). Base query usescontain()only. - Data source:
Offices. - Recommendation: Needs handler or join, or change to
Officers.office_idfor ID filtering.
- Why flagged:
branch_name- Why flagged:
queryFieldpoints toBranches.name(association). Base query usescontain()only. - Data source:
Branches. - Recommendation: Needs handler or join, or change to
Officers.branch_idfor ID filtering.
- Why flagged:
warrant_state- Why flagged: virtual/computed (no DB column). Auto-filter would generate
Officers.warrant_state. - Data source: computed in
Officer::_getWarrantState()from Office requirements and warrant associations. - Recommendation: Needs customFilterHandler.
- Why flagged: virtual/computed (no DB column). Auto-filter would generate
OfficesGridColumns (app/plugins/Officers/src/KMP/GridColumns/OfficesGridColumns.php)
department_id- Why flagged:
queryFieldpoints toDepartments.id(association). Base query usescontain()only. - Data source:
Departments(belongsToOffices). - Recommendation: Needs handler or join, or change to
Offices.department_id.
- Why flagged:
AwardsGridColumns (app/plugins/Awards/src/KMP/GridColumns/AwardsGridColumns.php)
domain_name- Why flagged:
queryFieldpoints toDomains.id(association). Base query usescontain()only. - Data source:
Domains(belongsToAwards). - Recommendation: Needs handler or join, or change to
Awards.domain_id.
- Why flagged:
level_name- Why flagged:
queryFieldpoints toLevels.id(association). Base query usescontain()only. - Data source:
Levels(belongsToAwards). - Recommendation: Needs handler or join, or change to
Awards.level_id.
- Why flagged:
branch_id- Why flagged:
queryFieldpoints toBranches.id(association). Base query usescontain()only. - Data source:
Branches(belongsToAwards). - Recommendation: Needs handler or join, or change to
Awards.branch_id.
- Why flagged:
RecommendationsGridColumns (app/plugins/Awards/src/KMP/GridColumns/RecommendationsGridColumns.php)
branch_id- Why flagged:
queryFieldpoints toBranches.id(association). Base query usescontain()only. - Data source:
Branches(member branch). - Recommendation: Needs handler or join, or change to
Recommendations.branch_id.
- Why flagged:
domain_name- Why flagged:
queryFieldpoints toDomains.id(association). Base query usescontain()only. - Data source:
Awards.Domains. - Recommendation: Needs handler or join, or change to
Awards.domain_idvia a custom handler if you want to filter by domain without an explicit join.
- Why flagged:
award_name- Why flagged:
queryFieldpoints toAwards.abbreviation(association). Base query usescontain()only. - Data source:
Awards. - Recommendation: Needs handler or join, or change to
Recommendations.award_idif dropdown values are IDs.
- Why flagged:
assigned_gathering- Why flagged:
queryFieldpoints toAssignedGathering.name(association). Base query usescontain()only. - Data source:
AssignedGathering(belongsToRecommendations). - Recommendation: Needs handler or join, or change to
Recommendations.gathering_id(orevent_idif still used).
- Why flagged:
branch_type- Why flagged:
queryFieldpoints toBranches.type(association). Base query usescontain()only. - Data source:
Branches. - Recommendation: Needs handler or join.
- Why flagged:
gatherings- Status: already has
customFilterHandler.
- Status: already has
GatheringWaiversGridColumns (app/plugins/Waivers/src/KMP/GridColumns/GatheringWaiversGridColumns.php)
branch_id- Why flagged:
queryFieldpoints toBranches.name(association). Base query joinsGatheringsbut does not joinBranches. - Data source:
Gatherings.Branches. - Recommendation: Needs handler or join, or change to
Gatherings.branch_id/GatheringWaivers.branch_id(if present).
- Why flagged:
waiver_type_id- Why flagged:
queryFieldpoints toWaiverTypes.name(association). Base query usescontain()only. - Data source:
WaiverTypes. - Recommendation: Needs handler or join, or change to
GatheringWaivers.waiver_type_idif present.
- Why flagged:
gathering_start_date- Why flagged: uses
Gatherings.start_date(association). - Data source:
Gatherings. - Recommendation: Probably OK because the base query uses
innerJoinWith('Gatherings'). Keep an eye on this if the base query changes.
- Why flagged: uses
Custom User Views (Other Than Recommendations)
Yes. These grids explicitly allow custom user views (canAddViews => true):
- Warrants grid (
app/src/Controller/WarrantsController.php) —gridKey: Warrants.index.main - Members grid (
app/src/Controller/MembersController.php) —gridKey: Members.index.main - Gatherings grid (
app/src/Controller/GatheringsController.php) —gridKey: Gatherings.index.main - Gathering Waivers grid (
app/plugins/Waivers/src/Controller/GatheringWaiversController.php) —gridKey: Waivers.GatheringWaivers.index.main
Notes:
- Recommendations grid also allows custom views (
canAddViews => true) and already uses a custom handler forgatherings. - Many other grids explicitly set
canAddViews => false, even when system views are enabled.