Issue #3628598: Allow the empty/not empty operators on custom field filters
Closes #3628598 (closed)
Custom field filters now get 'allow empty' => TRUE, so Views offers "Is empty (NULL)" and "Is not empty (NOT NULL)" for number, text, date, option list, Country and State/Province fields. ContactReference already had it.
The operators come from core: NumericFilter, StringFilter and InOperator add them when the flag is set, and opEmpty() writes a plain IS NULL / IS NOT NULL. The civicrm_entity_date and civicrm_entity_in_operator plugins don't override that part.
CivicrmViewsDataTest::testCustomFieldFiltersAllowEmpty builds the views data for each custom field type and checks that the filter offers both operators. It fails on 4.0.x and passes with this change (Drupal 11.4, CiviCRM 6.20, PHP 8.4).
AI-Generated: Yes (Claude Code was used to help draft this change, its test and this description. I reviewed it.)