I've just updated our dev civicrm installation from 4.5.4 to 4.6.6. Now, searches on custom fields of type 'Yes or No' are producing weird results.

Eg, In a custom dataset for some specific membership types we have a variety of Yes or No fields. The database appears to have the correct data in it as compared between our updated dev and our live sites.

However, in the dev site, a search of memberships for 'display on website' produces 93 results for Yes, 93 for No and 93 for 'Yes or No'!! There are 861 results in the db according to phpMyAdmin!!! Yikes!

On the live site, the same search yields 892 for Yes, 91 for No and 983 for 'Yes or No'. There are 901 results in the db table according to phpMYAdmin. (The diff here could be some contacts are deleted, also we don't expect the dev site and live to be exactly the same.)

I've done the same membership search on a variety of custom boolean fields and they all show the same very weird results on the dev site; the same number for yes, for no and for 'yes or no'. In the db the field has many, many more results than the membership search.

Any help on this would be much appreciated!

  • Could you specify whether you're seeing this in Advanced Search, Search Builder, or elsewhere? Can you test to see if the bug occurs in both Advanced Search and Search Builder? Finally, does the bug occur on the CiviCRM demo site at demo.civicrm.org? Commented Aug 10, 2015 at 21:21

2 Answers 2


I have replicated this on another site on 4.6.6 & logged https://issues.civicrm.org/jira/browse/CRM-17006


Submitted the fix https://github.com/civicrm/civicrm-core/pull/6470 , also include fix for custom field of other data types (integer, float, money etc.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.