CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Import (Moderator: Yashodha Chaku) »
  • Validation bug? Importing Country/Citizenship with commas
Pages: [1]

Author Topic: Validation bug? Importing Country/Citizenship with commas  (Read 589 times)

it-support

  • I’m new here
  • *
  • Posts: 3
  • Karma: 0
  • CiviCRM version: 4.5.5
  • CMS version: Drupal 7
  • MySQL version: 5.1.73
  • PHP version: 5.3.3
Validation bug? Importing Country/Citizenship with commas
February 11, 2015, 04:15:27 am
We are getting "Invalid value for field(s) : County" and " Invalid value for field(s) : Citizenship; Citizenship" import errors for records even where the data does exactly match the 'name' in the civicrm_country table and from the pattern that has developed  I'm starting to suspect the validation process which enforces this is stumbling on the comma that appears in the names of certain countries. ie. records with these values mapped to country name fail with such an error:
"Korea, Republic of"
"Iran, Islamic Republic of"

Am I correct in assuming this is a bug, and if so, can it be fixed?

ayduns

  • I post occasionally
  • **
  • Posts: 64
  • Karma: 6
    • Squiffle Consulting
  • CiviCRM version: 4.5.5
  • CMS version: Drupal 7
Re: Validation bug? Importing Country/Citizenship with commas
February 11, 2015, 06:42:32 am
Yes, importing country names with commas causes problems.

You can work around it by replacing those country names in your import file with the 2-letter ISO country code instead. The column can have a mix of names and codes.

The ISO codes are listed in civicrm_country table

For "Korea, Republic of" use "KR"
For "Iran, Islamic Republic of" use "IR"

JonGold

  • Ask me questions
  • ****
  • Posts: 638
  • Karma: 81
    • Palante Technology
  • CiviCRM version: 4.1 to the latest
  • CMS version: Drupal 6-7, Wordpress 4.0+
  • PHP version: PHP 5.3-5.5
Re: Validation bug? Importing Country/Citizenship with commas
February 11, 2015, 08:58:15 am
Hi it-support,

If you can replicate the bug on the demo server (demo.civicrm.org), which sounds like it should be easy enough, you can file a bug report at issues.civicrm.org with the steps to replicate (and referencing this forum post).

Reporting a bug is no guarantee it'll get fixed - the core team relies on third parties to contribute a lot of bug fixes - but reporting it is certainly the first step, and there's a not-unreasonable chance someone will pick this up.
Sign up to StackExchange and get free expert CiviCRM advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

ayduns

  • I post occasionally
  • **
  • Posts: 64
  • Karma: 6
    • Squiffle Consulting
  • CiviCRM version: 4.5.5
  • CMS version: Drupal 7
Re: Validation bug? Importing Country/Citizenship with commas
February 11, 2015, 11:53:33 am
Sounds like an example of this one: https://issues.civicrm.org/jira/browse/CRM-10839

it-support

  • I’m new here
  • *
  • Posts: 3
  • Karma: 0
  • CiviCRM version: 4.5.5
  • CMS version: Drupal 7
  • MySQL version: 5.1.73
  • PHP version: 5.3.3
Re: Validation bug? Importing Country/Citizenship with commas
February 12, 2015, 01:44:15 am
Thanks for the tip on the country codes; unfortunately our source data uses ISO 3166-1 alpha-3 rather than alpha-2 country codes, so the names are actually the simpler match (where they work), so it might be worth doing the test and submitting the issue after all.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Import (Moderator: Yashodha Chaku) »
  • Validation bug? Importing Country/Citizenship with commas

This forum was archived on 2017-11-26.