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

Filtering contacts on group using API explorer fails

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • 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

      You can use the Contact.get API to retrieve all contacts in a certain group, using it's ID, e.g.

      $result = civicrm_api3('Contact', 'get', array(
            'sequential' => 1,
            'group' => 4,
      ));
      

      Now if you do the same using the API explorer user interface, you get

      {
          "is_error": 1,
          "error_message": "A fatal error was triggered: Advisory Board is not of the type Int"
      }
      

      because it generates this API call:

      $result = civicrm_api3('Contact', 'get', array(
            'sequential' => 1,
            'group' => "Advisory Board",
      ));
      

      instead of

      $result = civicrm_api3('Contact', 'get', array(
            'sequential' => 1,
            'group' => 4,
      ));
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              johanv Johan Vervloet
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: