CRM-1926 Import of contribution with unmatched Contribution Type will report success incorrectly

    Details

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

      Description

      Contribution import is NOT validating the Contribution Type field. Currently, if an import row has an "unmatched" Contribution Type string, we insert a contribution record with a NULL contribution_type_id value. These contribution records are invalid, they don't show up on the Contribution tab and are not returned by searches.

      We should be checking for valid contribution types when we validate other input file properties between the mapping and preview step. AND, if they continue and do the import - we should write an error to the error file and skip the record.

      — Original Post from Chris Mott --------
      When a contribution record is imported with an unmatched "Contribution Type", the import will report that the row was successfully imported on the final count of imported records, but it will not appear subsequently in any searches.

      To recreate this:
      1. Create a CSV file with two contribution records, one with type "Donation" and one with type "Donations" (or any different spelling)
      2. Import the file, The final report will indicate that 2 rows were successfully imported.
      3. Search for all contribution records and observe that only the row with correctly spelled "Donation" will appear.

      Fix should include a check on this Contribution Type matching so that an error to the user will be presented.

        Attachments

          Activity

          [CRM-1926] Import of contribution with unmatched Contribution Type will report success incorrectly
          Pankaj Sharma added a comment -

          fix rev 9636

          Keith A. Prickett added a comment -

          I ran into this bug. My contributions disappeared. The horrible thing was that I specified the contribution types, but in plain text using the name of the type, rather than the ID. Is there a way to make this import work by specifying the exact text, rather than just the type ID?

          David Greenberg added a comment -

          Keith - the import does "expect" the contribution type "name" (text). All my imports use these strings - "Donation", "Campaign Contribution" etc. If your imports are not working when an exact matching text string is used - please replicate on the demo server and file a separate issue. If you have questions about how it's working, best to continue this on the forums.

          Manish Zope added a comment -

          Verify for 2.0

            People

            • Assignee:
              Sunil Pawar
              Reporter:
              Chris Mott

              Dates

              • Created:
                Updated:
                Resolved: