Answers.Body: <p>I have replicated this on another site on 4.6.6 &amp; logged <a href="https://issues.civicrm.org/jira/browse/CRM-17006" rel="nofollow">https://issues.civicrm.org/jira/browse/CRM-17006</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-08-10T23:14:15.797Z
Answers.LastActivityDate: 2015-08-10T23:14:15.797Z
Answers.UserDisplayName: eileen
Answers.Body: <p>Submitted the fix <a href="https://github.com/civicrm/civicrm-core/pull/6470" rel="nofollow">https://github.com/civicrm/civicrm-core/pull/6470</a> , also include fix for custom field of other data types (integer, float, money etc.)</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-08-11T11:35:10.693Z
Answers.LastActivityDate: 2015-08-11T11:35:10.693Z
Answers.UserDisplayName: Monish Deb
Body: <p>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. </p>
  
  <p>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. </p>
  
  <p>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! </p>
  
  <p>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.)</p>
  
  <p>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.</p>
  
  <p>Any help on this would be much appreciated!</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-08-10T21:21:58.187Z
Comments.Text: 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 http://demo.civicrm.org?
Comments.UserDisplayName: Jon G - Megaphone Tech
Tags: <civimember><custom-fields><search-results>
Title: Search on custom 'Yes or No' fields appears broken in 4.6.6
ThreadText: # Search on custom 'Yes or No' fields appears broken in 4.6.6
  
  (Asked by: username_0 on 2015-08-10)
  
  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!
  
  **Tags:** civimember, custom-fields, search-results
  
  > **Comments:**
  > **username_1**: 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 http://demo.civicrm.org?  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2015-08-10. Score: 3
  
  I have replicated this on another site on 4.6.6 & logged <https://issues.civicrm.org/jira/browse/CRM-17006>
  
  
  ---
  
  ### Answer by username_3 on 2015-08-11. Score: 1
  
  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.)
  
  
  ---
  
  