Answers.Body: <p>You've found a bug.  Check out <a href="https://civicrm.org/bug-reporting" rel="nofollow">Reporting a Bug</a>, starting with step 7.</p>
  
  <p>As a point of interest - variations on this bug have been reported before. For instance, <a href="https://issues.civicrm.org/jira/browse/CRM-6652" rel="nofollow">CRM-6652</a>, several years ago, which was only fixed last month with <a href="https://issues.civicrm.org/jira/browse/CRM-16483" rel="nofollow">CRM-16483</a>.</p>
  
  <p>If you're looking to patch this yourself, I would definitely look to CRM-16483 as a model.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-06-15T15:32:36.737Z
Answers.Text: Thanks for the confirmation, Jon. I'll file a bug ASAP and look at attempting a patch. Cheers.
Answers.UserDisplayName: LunkRat
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-06-15T19:48:44.507Z
Answers.Text: @LinkSwanson - I was going through the issue tracker today, just wanted to make sure you were aware of https://issues.civicrm.org/jira/browse/CRM-16286 so that you tried patching this on Civi 4.6.4+.
Answers.UserDisplayName: Jon G - Megaphone Tech
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-06-22T15:59:25.787Z
Answers.Text: Can anyone think of a workaround that would allow me to create a smart group with communication method != Phone?
Answers.UserDisplayName: LunkRat
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-06-22T18:20:25.133Z
Answers.Text: @LinkSwanson  Use Communication Preference IN ('Email', 'SMS', etc.)?
Answers.UserDisplayName: Jon G - Megaphone Tech
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-06T18:11:11.057Z
Answers.Text: Thanks @JonG your suggestion worked on 4.6.3 ... then I upgraded to 4.6.4 and it no longer works. Using the `in` operator gives an error `Notice: Undefined index: IN in CRM_Contact_BAO_Query->preferredCommunication() (line 4007 of /srv/buildkit/build/d46/sites/all/modules/civicrm/CRM/Contact/BAO/Query.php).` on the CiviCRM demo site. None of the operators work when using `Preferred Communication Method`. This bug is really hurting the reputation of CiviCRM within our organization.
Answers.UserDisplayName: LunkRat
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-06T22:39:29.033Z
Answers.Text: @LinkSwanson That's completely understandable that it's hurting CiviCRM's reputation. CiviCRM is free to use, but not free to write - and given my own experiences, I suspect that the folks in whose eyes Civi's reputation is hurt are folks who aren't willing to pay for bug fixes. If I'm wrong, you may want to encourage them to help everyone - including themselves - by paying you to write the patch, or by submitting this to the paid issue queue: https://civicrm.org/paid-issue-queue
Answers.UserDisplayName: Jon G - Megaphone Tech
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-06-12T20:18:01.270Z
Answers.LastActivityDate: 2015-06-12T20:18:01.270Z
Answers.UserDisplayName: Jon G - Megaphone Tech
Body: <p>You can reproduce this yourself on the demo site:</p>
  
  <pre><code>Search Builder &gt; Contacts &gt; Preferred Communication Method = Phone
  </code></pre>
  
  <p>Returns the <em>exact same</em> results as</p>
  
  <pre><code>Search Builder &gt; Contacts &gt; Preferred Communication Method != Phone
  </code></pre>
  
  <p>See the screenshots:</p>
  
  <p><img src="https://i.sstatic.net/XJFdT.png" alt="equals"></p>
  
  <p>and then:</p>
  
  <p><img src="https://i.sstatic.net/AD6dC.png" alt="enter image description here"></p>
  
Tags: <issues><search-builder>
Title: Search builder operators do not work for Preferred Communication Method
ThreadText: # Search builder operators do not work for Preferred Communication Method
  
  (Asked by: username_0 on 2015-06-12)
  
  You can reproduce this yourself on the demo site:
  Search Builder > Contacts > Preferred Communication Method = Phone
  
  Returns the exact same results as
  Search Builder > Contacts > Preferred Communication Method != Phone
  
  See the screenshots:
  
  and then:
  
  **Tags:** issues, search-builder
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2015-06-12. Score: 2 | Accepted answer
  
  You've found a bug. Check out [Reporting a Bug](https://civicrm.org/bug-reporting), starting with step 7.
  
  As a point of interest - variations on this bug have been reported before. For instance, [CRM-6652](https://issues.civicrm.org/jira/browse/CRM-6652), several years ago, which was only fixed last month with [CRM-16483](https://issues.civicrm.org/jira/browse/CRM-16483).
  
  If you're looking to patch this yourself, I would definitely look to CRM-16483 as a model.
  
  > **Comments:**
  > **username_0**: Thanks for the confirmation, Jon. I'll file a bug ASAP and look at attempting a patch. Cheers.  
  > **username_1**: @LinkSwanson - I was going through the issue tracker today, just wanted to make sure you were aware of https://issues.civicrm.org/jira/browse/CRM-16286 so that you tried patching this on Civi 4.6.4+.  
  > **username_0**: Can anyone think of a workaround that would allow me to create a smart group with communication method != Phone?  
  > **username_1**: @LinkSwanson  Use Communication Preference IN ('Email', 'SMS', etc.)?  
  > **username_0**: Thanks @JonG your suggestion worked on 4.6.3 ... then I upgraded to 4.6.4 and it no longer works. Using the `in` operator gives an error `Notice: Undefined index: IN in CRM_Contact_BAO_Query->preferredCommunication() (line 4007 of /srv/buildkit/build/d46/sites/all/modules/civicrm/CRM/Contact/BAO/Query.php).` on the CiviCRM demo site. None of the operators work when using `Preferred Communication Method`. This bug is really hurting the reputation of CiviCRM within our organization.  
  > **username_1**: @LinkSwanson That's completely understandable that it's hurting CiviCRM's reputation. CiviCRM is free to use, but not free to write - and given my own experiences, I suspect that the folks in whose eyes Civi's reputation is hurt are folks who aren't willing to pay for bug fixes. If I'm wrong, you may want to encourage them to help everyone - including themselves - by paying you to write the patch, or by submitting this to the paid issue queue: https://civicrm.org/paid-issue-queue  
  
  ---
  
  