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

Membership import does not display custom fields in the matching dropdown if they are used in a dedupe rule

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Fixed/Completed
    • Affects Version/s: 3.3.2
    • Fix Version/s: 3.4.alpha
    • Component/s: CiviMember
    • Labels:
      None

      Description

      I've got contacts imported from a csv and have a default strict dedupe rule that matches on three custom data fields.

      When I go to import memberships using the same file, I find that the three custom fields are not available to match on and only appear as (match to contact) three times above the – do not import – line.

      The cause seems to be that the following line (1032 of CRM/Contact/BAO/Contact.php):

      CRM_Core_BAO_CustomField::getFieldsForImport($contactType, $showAll, true) );

      which returns an array of fields keyed with 'custom_25', 'custom_4' etc, and cannot be searched properly by this line (849 of CRM/Member/BAO/Member.php)

      $tmpContactField[trim($value)] = CRM_Utils_Array::value(trim($value),$contactFields);

      which is looking for an array keyed with something like 'my_custom_field_name_25'.

      I've tried all I can think of to get caches cleared etc and no amount of recreating the fields or redoing the imports has helped.

        Attachments

          Activity

            People

            • Assignee:
              ashwini Ashwini Poharkar
              Reporter:
              mattgibson Matt Gibson
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: