Body: <p>I have this problem on the Joomla demo site (4.6.0) and my own sites with versions 4.6.8 and 4.7.1.</p>
  
  <p>If I use the API explorer or run test php code, with a query checking for multiple contact_sub_type, I get 0 results:</p>
  
  <pre><code>$result = civicrm_api3('Contact', 'get', array(
    'sequential' =&gt; 1,
    'return' =&gt; "contact_sub_type",
    'contact_sub_type' =&gt; array('IN' =&gt; array("Student", "Parent")),
  ));
  </code></pre>
  
  <p>But if I search using the = operator for one contact_sub_type at a time, it returns the expected results:</p>
  
  <pre><code>$result = civicrm_api3('Contact', 'get', array(
    'sequential' =&gt; 1,
    'return' =&gt; "contact_sub_type",
    'contact_sub_type' =&gt; "Parent",
  ));
  
  {"is_error":0,"version":3,"count":1,"id":7,"values":[{"contact_id":"7","contact_sub_type":["Parent"],"contact_is_deleted":"0","id":"7"}]}
  </code></pre>
  
  <p>This happens with subtypes of both Organization and Individual types.</p>
  
  <p>I could work around it by performing multiple api calls and merging the results, but this seems like a bug?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-04-11T22:03:43.980Z
Comments.Text: I just ran into the same thing and I agree, this seems like a bug. Have you submitted a bug to JIRA before? https://issues.civicrm.org/jira/secure/CreateIssue!default.jspa
Comments.UserDisplayName: Laryn
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-04-12T19:57:01.303Z
Comments.Text: I have used JIRA before, but have not submitted a bug report for this issue.  What CiviCRM version are you using?  I haven't tested any releases newer than 4.7.1.
Comments.UserDisplayName: Norris
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-04-12T20:00:42.670Z
Comments.Text: When getting ready to submit a bug report it's a good idea to test on the demo server with the latest version so you can specify steps to repeat the issue in your bug ticket. e.g. http://dmaster.demo.civicrm.org
Comments.UserDisplayName: Laryn
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-04-13T03:50:37.987Z
Comments.Text: Filed a bug at https://issues.civicrm.org/jira/browse/CRM-18403
Comments.UserDisplayName: Norris
Tags: <api><issues><contact-types>
Title: API get of multiple contact_sub_type returns no results
ThreadText: # API get of multiple contact_sub_type returns no results
  
  (Asked by: username_0 on 2016-02-15)
  
  I have this problem on the Joomla demo site (4.6.0) and my own sites with versions 4.6.8 and 4.7.1.
  If I use the API explorer or run test php code, with a query checking for multiple contact_sub_type, I get 0 results:
  $result = civicrm_api3('Contact', 'get', array(
    'sequential' => 1,
    'return' => "contact_sub_type",
    'contact_sub_type' => array('IN' => array("Student", "Parent")),
  ));
  
  But if I search using the = operator for one contact_sub_type at a time, it returns the expected results:
  $result = civicrm_api3('Contact', 'get', array(
    'sequential' => 1,
    'return' => "contact_sub_type",
    'contact_sub_type' => "Parent",
  ));
  
  {"is_error":0,"version":3,"count":1,"id":7,"values":[{"contact_id":"7","contact_sub_type":["Parent"],"contact_is_deleted":"0","id":"7"}]}
  
  This happens with subtypes of both Organization and Individual types.
  I could work around it by performing multiple api calls and merging the results, but this seems like a bug?
  
  **Tags:** api, issues, contact-types
  
  > **Comments:**
  > **username_1**: I just ran into the same thing and I agree, this seems like a bug. Have you submitted a bug to JIRA before? https://issues.civicrm.org/jira/secure/CreateIssue!default.jspa  
  > **username_0**: I have used JIRA before, but have not submitted a bug report for this issue.  What CiviCRM version are you using?  I haven't tested any releases newer than 4.7.1.  
  > **username_1**: When getting ready to submit a bug report it's a good idea to test on the demo server with the latest version so you can specify steps to repeat the issue in your bug ticket. e.g. http://dmaster.demo.civicrm.org  
  > **username_0**: Filed a bug at https://issues.civicrm.org/jira/browse/CRM-18403  
  
  ---
  
  ## 0 answers
  
  