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

Nested query filter not being applied

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Incomplete
    • Affects Version/s: 4.2.8
    • Fix Version/s: Unscheduled
    • Component/s: CiviCRM API
    • Labels:
    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      None
    • Funding Source:
      Needs Funding

      Description

      I'm using the api to pull out a few contacts that meet a particular criteria and their associated activites. So I'm using the api's chained syntax that looks like this:

      $results = civicrm_api('contact', 'get', array(
      'version' => 3,
      'contact_type' => 'Organization',
      'contact_sub_type' => 'Party',
      'world_region' => 1,
      'options' => array(
      'limit' => 20,
      ),
      'api.activity.get' => array(
      'source_contact_id' => '$value.id',
      'activity_type_id' => '54',
      ),
      ));

      You can see that I'm trying to filter the associated activities based on two criteria: activity_type_id and source_contact_id. However, neither of these filters appear to be applied.

      Is this not expected to work, or is it a bug?

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              torrance123 Torrance
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: