Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Major
-
Resolution: Fixed/Completed
-
Affects Version/s: 1.7
-
Component/s: Core CiviCRM
-
Labels:None
Description
If you use Import to Fill or Update data for existing Organization OR Household records AND pass in the Internal Contact ID - the import fails for all or most records with the error msg: "Mismatched contact IDs OR Mismatched contact Types :"
When either Internal Contact ID OR External Contact ID is mapped AND is NOT NULL for imports with mode = File or Update, we should always use that value to match to the contact record. The error above should be thrown if the matching contact in the DB is not of the type that we have selected for import (i.e. the found contact is an Individual, but we are importing Organization records).
To recreate w/ sample data:
- Find Contacts - contact type = Organization (returns 11 records)
- Export ALL records
- Select fields for Export
- Select Org -> Internal Contact ID AND Org -> Source fields
- Export
Save the export file and then manually enter Source values in some fields (they'll be empty from the export)
Now Import the saved file with the following settings
- Import contact type = Organization
- Mode = Fill
- Map the Internal Contact ID and Source columns
- Import
----------------------------
I did note some other odd behavior when doing the following test w/ Households using generated (sample) data:
- Find Contacts - contact type = Household (returns 15 records)
- Export ALL records
- Select fields for Export
- Select Household -> Internal Contact ID AND Household -> Source fields
- Export
Save the export file and then manually enter Source values in some fields.
Now Import the saved file with the following settings
- Import contact type = Household
- Mode = Fill
- Map the Internal Contact ID and Source columns
- Import
In my test, 14 records failed with the above error (the main bug). However, ONE record succesfully imported. This happened to be the record for a Household where we have two Households with the exact same Household Name (and both were referenced in the import). "Anne Smith's home" This result makes me suspect some other bug in the import - but I can't quite figure out what the code might be doing to get this outcome ??
-
-
- Once you've got this fixed, please test with the original cases (Org and Household FILL, UPDATE) - and test with an import file that includes both data to UPDATE and some new records (these records would have the mapped Internal Contact ID cell blank - and would have an Organization Name or Household Name column w/ values). Also test using External Contact ID as the mapped matching field.***
-