CRM-6569 civicrm_membership_contact_get() does not respect 'is_test'

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: 3.1.5
    • Fix Version/s: 4.1.0
    • Component/s: CiviCRM API
    • Labels:
      None

      Description

      This code doesn't work. Test memberships are still returned.

      require_once('api/v2/Membership.php');
      $params = array(
      'contact_id' => $contactID,
      'is_test' => 0, //using 'member_is_test' doesn't work either
      );
      $allMemberships = civicrm_membership_contact_get($params);

      I'd suggest that the default behavior of the function should be to exclude test membership; this would be consistent with the UI behavior. i.e., a developer would have to explicity supply a param if test memberships are desired.

        Attachments

          Activity

          [CRM-6569] civicrm_membership_contact_get() does not respect 'is_test'
          Donald A. Lobo added a comment -

          matt:

          Would be great if you can investigate and provide a patch

          Eileen McNaughton added a comment -

          If this is happening in the v3 API then log an issue for that & we'll investigate but v2 is no longer being 'improved'

            People

            • Assignee:
              Eileen McNaughton
              Reporter:
              Matt Chapman

              Dates

              • Created:
                Updated:
                Resolved: