Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Major
-
Resolution: Fixed/Completed
-
Affects Version/s: 2.2.0
-
Fix Version/s: Unscheduled
-
Component/s: Core CiviCRM
-
Labels:None
Description
If we have only state (no country) during import, then we should check if state exists for default country, else ignore state value and give error.
— Original Post ----------------
I'm using CiviCRM v2.2 in standalone, running on a Fedora Core 10 system. The same problem existed in v2.1.
I have a list of contacts that I'm importing from a CSV file. Almost all (but not absolutely all) have addresses in the US, so the field is unpopulated in the CSV file. The default country for new contacts is set to the US (I checked specifically).
What's happening is that the imported contacts have the wrong country assigned after import. It looks like what's happening is that instead of applying the default country, it looks at the state (VA, for Virginia) and grabs the first country with a state that sorta matches (in this case, putting our contacts in Hungary). It should probably work the other way around - assign the default country if there isn't one explicitly given, then match the state.
I've duplicated the problem at http://drupal.demo.civicrm.org with the attached CSV file. I set the default country to USA, imported the two records in the CSV file - one has Qatar for the country, the other Australia. Neither are correct.
Thanks!