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

Custom field import incorrectly validates against labels rather than values

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 1.7
    • Fix Version/s: None
    • Component/s: CiviContribute
    • Labels:
      None

      Description

      Importing custom fields created for Contributions validates entries based on labels rather than values. For custom fields of type Alphanumeric select, the import works if labels values are used. For custom fields of type Integer a successful import is not possible. (This issue may apply to all custom fields, but I was just testing the case of association to Contributions).

      To recreate:
      1. Create a custom field group that is associated with Contributions. For example we'll call it "Contribution Region".
      2. Create two fields in the group:
      a) "Region (Alphanumeric)" that is an alphanumeric select with Label, Value pairs of "West Coast", "West"}, {"East Coast", "East"
      b) "Region (Integer)" that is an integer select with Label, Value pairs of "West Coast", 1}, {"East Coast", 2

      Test these cases:

      3a. Import contribution records with a match between "Region (Alphanumeric)" and a field in a CSV file with value of "East".
      ACTUAL RESULT: An error is flagged in the preview step indicating that there is an incorrect value in the "Region (Alphanumeric)" field.
      DESIRED RESULT: Import correctly by matching alphanumeric values.

      3b. Import contribution records with a match between "Region (Alphanumeric)" and a field in a CSV file with value of "East Coast".
      ACTUAL RESULT: Import is reported as successful, and "Region (Alphanumeric)" field displays corresponding label.
      DESIRED RESULT: Provide error in preview indicating that the values do not match.

      3c. Import contribution records with a match between "Region (Integer)" and a field in a CSV file with value of 1.
      ACTUAL RESULT: An error is flagged in the preview step indicating that there is an incorrect value in the "Region (Alphanumeric)" field.
      DESIRED RESULT: Import correctly by matching integer values, and showing corresponding alphanumeric labels when viewing the records.

      3d. Import contribution records with a match between "Region (Integer)" and a field in a CSV file with value of "East Coast".
      ACTUAL RESULT: Import is reported as successful, BUT "Region (Integer)" field show null values when viewing records.
      DESIRED RESULT: Provide error in preview indicating that the values do not match.

        Attachments

          Activity

            People

            • Assignee:
              lobo Donald A. Lobo
              Reporter:
              chrism Chris Mott
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: