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

API search on smart group with custom membership field fails

    Details

    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      None
    • Funding Source:
      Needs Funding

      Description

      List contacts belonging to a Smart Group constructed using a custom field on Membership fails disastrously in API (the group works fine when used inside of CiviCRM). Note: smart groups with non-custom Membership fields work fine.

      Using the API explorer ...

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

      Returned

      {
      	"error_code":"no such field",
      	"tip":"add debug=1 to your API call to have more info about the error",
      	"is_error":1,
      	"error_message":"DB Error: no such field"
      }
      

      This and the second issue that I submitted are combining to kill my ability to make chapter membership lists using the REST API.

      This issue has the same result when done in the API Explorer and when done using the REST API, so I assume it is a general API issue.

      I am working around these issues by creating a Cron job to copy the needed information into database tables on our website (not Drupal, Wordpress, or Joomla). Without this work-around, which defeats the purpose of an API, I would be at a total standstill and in emergency mode.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              ecotypes@verizon.net Shirley Denton
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: