Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Trivial
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.4.5
-
Fix Version/s: 4.5
-
Component/s: CiviCRM Search, Core CiviCRM
-
Labels:None
-
Documentation Required?:None
Description
When selecting multiple privacy options in advanced search, you have the choice of and "AND" or "OR" operator. However, when you choose to exclude rather than include the privacy options, "AND" and "OR" are reversed from the correct behavior. When you select "include" by privacy options, the behavior is correct.
This is almost certainly because the SQL being produced is:
!(A || B)
the correct behavior would be
!A || !B
To reproduce on the demo server:
Do an advanced search for all individuals. Get 193 contacts.
Do a search to exclude "Do Not Phone". Get 157 contacts.
Do a search to exclude "Do Not Trade". Get 160 contacts.
Do a search to exclude "Do Not Phone" OR "Do Not Trade". Get 186 contacts.