Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Minor
-
Resolution: Won't Fix
-
Affects Version/s: 4.7
-
Fix Version/s: None
-
Component/s: CiviCRM API
-
Labels:
-
Documentation Required?:None
-
Funding Source:Needs Funding
Description
For an event with 21 participants with status 'registered' and 1 with status 'cancelled' we get very inconsistent results reported through the api. It seems at least the operators != and NOT IN are not working properly. != and = have the same result and I think NOT IN is not working at all.
CRM.api3('Participant', 'get', {'status_id' => "Cancelled",
result: "count": 1 (correct!)
CRM.api3('Participant', 'get', {'status_id' => array('!=' => "Cancelled"),
result: "count": 1 (instead of 21)
CRM.api3('Participant', 'get', { 'status_id' => array('IN' => array("Cancelled")),
result: "count": 1 (correct!)
CRM.api3('Participant', 'get', {'status_id' => array('NOT IN' => array("Cancelled")),
result: "count": 0 (instead of 21)