Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-17873

API fails to report on particiant status_id

    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)

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              magnolia61 Richard
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: