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

Function check_custom_parms does not take inactive custom fields into consideration, parameter showAll should be added

    Details

    • Type: Patch
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 3.2.3
    • Fix Version/s: 3.2.6
    • Component/s: CiviCRM API
    • Labels:
      None

      Description

      The current contact API only allows data to be added for custom data that are active. In some cases (mine for example with data synchronization) it can be necessary to be able to add custom data through the API that is not active to the user.
      The function civicrm_check_custom_parms calls a BAO function:
      $customFields = CRM_Core_BAO_CustomField::getFields( $params['contact_type'], false, false, $csType, null, $onlyParent );

      The second parameter $showAll controls if all or only active fields are used, the solution is to include that parameter in the API function.

        Attachments

          Activity

            People

            • Assignee:
              xavier xavier dutoit
              Reporter:
              erikhommel Erik Hommel
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Due:
                Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour
                1h