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

Contact import fails silently on lookup of custom field option values by label

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.4.4
    • Fix Version/s: 4.4.5
    • Component/s: Core CiviCRM
    • Labels:
      None

      Description

      Users are "supposed to be" able to import data to a multiple choice custom field using either the option value OR option label. (See documentation from book below). This is no longer working properly. When import cell contains option label, no error is reported BUT the label is saved in the DB rather than the value (which is not valid). This is definitely a regression. The code still "knows" that the label is valid since it does a lookup and doesn't report an error. However, it saves the "wrong" data to the DB column.

      === from book.civicrm.org / Importing Data ====

      "If you are importing data into multi-choice (e.g. check-box or radio button) custom fields, your data source can use either the label (what's visible to the user in the CiviCRM front end) or the value (what's actually stored in the database for that choice). CiviCRM will recognise it and import it appropriately. When importing into multi-choice core data fields, you can specify only the value(s) in your data source, not the label."

      =====================================

      — original description —
      Imported some test contact records to Demo 4.4.4 containing data in "Constituent Information - Marital Status" field. Records imported ok, but no Status displayed under Constituent Information tab.
      Imported records are found using Search Builder (" Contact Type - 'Individual' ...AND...Marital Status IS NOT NULL" ) but not found if searching for specific Status (e.g. Single, Married etc). ("No matches found for: Contact Type - 'Individual' ...AND...Marital Status = Single")
      Import file attached.

        Attachments

        1. after_importing_supplied_csv_in_issue.png
          38 kB
          Pratik Joshi
        2. demo_contacts_load.csv
          0.5 kB
          Tom Crawshaw
        3. Screen Shot 2014-04-14 at 9.16.32 AM.PNG
          54 kB
          David Greenberg
        4. Screen Shot 2014-04-14 at 9.17.24 AM.PNG
          28 kB
          David Greenberg
        5. Screen Shot 2014-04-15 at 9.34.36 AM.PNG
          126 kB
          David Greenberg
        6. Screen Shot 2014-04-15 at 9.36.10 AM.PNG
          37 kB
          David Greenberg
        7. step1_before_update.png
          10 kB
          Pratik Joshi
        8. step2_importin_values.png
          35 kB
          Pratik Joshi
        9. step3_after_import.png
          10 kB
          Pratik Joshi

          Activity

            People

            • Assignee:
              pratik.joshi Pratik Joshi
              Reporter:
              tomc Tom Crawshaw
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: