-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds is Empty/NULL operators #423
Adds is Empty/NULL operators #423
Conversation
Cherry picked commit from #416 onto 4.0.x applied cleanly |
Hmm. Probably need a test to go with this! |
Hmm. -While looking at writing a test spotted this comment:
|
Finally testing this. Tested with "Contact SubType" filter on a test view. I feel like there's some small thing needed to do still to not have this error if first used by people |
In the base class this object is inherited from, in the parent function operators Looks like error message is generated here: I see in PHP error log this error as well: I think the php file needs a "use" statement for Condition. |
$nullOP = 'IS NOT NULL'; | ||
} | ||
|
||
$condition = new Condition('OR'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No "use" statement in file for this object. This throws an error to the PHP log
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was confused but now it's clear! This was removed from the 4.x branch.
Developer responded and fixed nits from feedback. Tested with contact sub-type filter in a View. Merging #423 |
* origin/4.0.x: (41 commits) patch from issue 3420771 (eileenmcnaughton#475) only check for data in enabled components on module uninstall (eileenmcnaughton#476) Adds is Empty/NULL operators (eileenmcnaughton#423) Pathauto (eileenmcnaughton#470) fix test to use string instead of integer for zip code (eileenmcnaughton#474) 4.0.x field mappings (eileenmcnaughton#430) Adding a raw value function to return value from values array (eileenmcnaughton#465) Add filter for state province. (eileenmcnaughton#453) Update default timezone handling for dates in CiviEntityStorage.php (eileenmcnaughton#461) fix testLoadContact birthdate assertion (eileenmcnaughton#472) port to 4.0.x from 436: Include dblocale table names in list of civicrm entity info (eileenmcnaughton#438) Ignore convert to UTC if custom field is date only (eileenmcnaughton#469) update contact entity referece field on contact merge (eileenmcnaughton#456) update test versions of Drupal 10.2 and CiviCRM 5.69 (eileenmcnaughton#468) Clean value on custom field for Float (Number) and Money field type (eileenmcnaughton#463) From eileenmcnaughton#378 for 4.0.x (eileenmcnaughton#466) Add reset to the file URLs generated. (eileenmcnaughton#458) fix Views field custom date field output for year only (eileenmcnaughton#439) update Add Contact to Group Views Bulk operations action plugin access handler (eileenmcnaughton#464) Readme update (eileenmcnaughton#457) ...
* origin/4.0.x: patch from issue 3420771 (eileenmcnaughton#475) only check for data in enabled components on module uninstall (eileenmcnaughton#476) Adds is Empty/NULL operators (eileenmcnaughton#423) Pathauto (eileenmcnaughton#470) fix test to use string instead of integer for zip code (eileenmcnaughton#474) 4.0.x field mappings (eileenmcnaughton#430) Adding a raw value function to return value from values array (eileenmcnaughton#465) Add filter for state province. (eileenmcnaughton#453) Update default timezone handling for dates in CiviEntityStorage.php (eileenmcnaughton#461) fix testLoadContact birthdate assertion (eileenmcnaughton#472) port to 4.0.x from 436: Include dblocale table names in list of civicrm entity info (eileenmcnaughton#438)
Overview
Replicates behaviour from search builder. Adds two filters 'Is EMPTY/NULL' and the negative.
By default drupals InOperator provides an is empty filter however this only checks for null values.
These check to see if the field is empty or null. This is useful for cases where fields can be both NULL or empty.
Before
On a view we can filter by these options.
After
On a view we can filter by these options.
Release notes snippet
Adds new filter option Is Empty/NULL and Is Not Empty/NULL