CRM-15534 API Contact.getfields does not return fields for sub-types

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.5.2
    • Fix Version/s: 4.5.3
    • Component/s: CiviCRM Search
    • Labels:
      None
    • Documentation Required?:
      None

      Description

      This is a regression from 4.4

      Create custom data set and a select field with options for Student subtype.
      Go to Search builder and select that field - the values are not loaded in the value[1][0] field. They are loaded in 4.4

        Attachments

          Activity

          [CRM-15534] API Contact.getfields does not return fields for sub-types
          Coleman Watts added a comment -

          This is arguably a bug in api.contact.getfields - the custom fields related to a sub-type are not returned. I think that is probably not the correct behavior.

          Coleman Watts added a comment -

          https://github.com/civicrm/civicrm-core/pull/4476

          Eileen and/or Tim how does this look to you?

          Eileen McNaughton added a comment -

          I find that code mildly terrifying. But it does make sense. I thought api_v3_CustomValueContactTypeTest provided some coverage.

          NB I don't think the scenerio where id is passed in is covered. Potentially you might need to load the contact_sub_type/.

          Coleman Watts added a comment -

          Well the tests all pass, that's good enough for me.

            People

            • Assignee:
              Coleman Watts
              Reporter:
              David Greenberg

              Dates

              • Created:
                Updated:
                Resolved: