Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Minor
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.1.2
-
Fix Version/s: 4.2.0
-
Component/s: CiviCRM Search
-
Labels:None
Description
when using search builder, you are unable to search tags IS NULL or IS NOT NULL – both of which can be valuable searches. there are several issues:
- if you search IS NULL, you get a form rule error because an array is constructed with an empty key when no value is passed (the keys represent tag ids)
- that also is passed as a param in post process. in both cases, we need to reinterpret it as a simple null.
- the tag handling in the query builder assumes IN will be used, even though it does allow passing an $op value. we need conditional handling so that if IS NULL/NOT NULL is passed, we build the where clause appropriately.
our patch is here:
https://github.com/nysenate/Bluebird-CRM/commit/8f676b82cb1a335c5198064e1b8a106bc1cf6013
it's a bit hackish in areas, esp. the piece where we fix the null key. i'm not sure if we should be handling that farther up the tree (seems strange that we're passing it that way). but the gist of it is there.
Attachments
Issue Links
- supplements
-
CRM-14157 Search for people who DON'T have a particular tag
- Done/Fixed