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

API: searching on custom fields only works for contacts

    Details

    • Documentation Required?:
      None
    • Funding Source:
      Contributed Code

      Description

      If you have custom fields on an event, and you try to find an event with a specific value in a custom field, the api ignores that. E.g.

      $result = civicrm_api3('Event', 'get', array(
      'sequential' => 1,
      'custom_7' => 12345,
      ));

      returns all events, instead of the events with 12345 as custom value in the custom field with ID 7.

        Issue Links

          Activity

          Hide
          eileen Eileen McNaughton added a comment -
          Show
          eileen Eileen McNaughton added a comment - Not this is the PR https://github.com/civicrm/civicrm-core/pull/6488
          Hide
          galgeek Barbara Miller added a comment -

          I'm seeing the same issue with API searches on contribution custom fields, too.

          Show
          galgeek Barbara Miller added a comment - I'm seeing the same issue with API searches on contribution custom fields, too.
          Hide
          eileen Eileen McNaughton added a comment -

          Barbara - what version? Contribution api is actually a different beast internally to event api - but I did think that we had some test in core around custom fields with contribution api now.

          Show
          eileen Eileen McNaughton added a comment - Barbara - what version? Contribution api is actually a different beast internally to event api - but I did think that we had some test in core around custom fields with contribution api now.
          Hide
          dgg David Greenberg added a comment -

          Closing this issue as the related PR has been merged.

          Show
          dgg David Greenberg added a comment - Closing this issue as the related PR has been merged.
          Hide
          galgeek Barbara Miller added a comment -

          Eileen — I saw the same bug using the REST API on contribution gets using CiviCRM v. 4.6.2 — maybe a more recent update has fixed this?

          Show
          galgeek Barbara Miller added a comment - Eileen — I saw the same bug using the REST API on contribution gets using CiviCRM v. 4.6.2 — maybe a more recent update has fixed this?

            People

            • Assignee:
              eileen Eileen McNaughton
              Reporter:
              johanv Johan Vervloet
            • Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development