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) »
  • Importing a country into a custom field for an activity
Pages: [1]

Author Topic: Importing a country into a custom field for an activity  (Read 1128 times)

Gemma Potaka

  • I’m new here
  • *
  • Posts: 3
  • Karma: 0
  • CiviCRM version: All
  • CMS version: Mostly Drupal
  • MySQL version: Most current
  • PHP version: Most current
Importing a country into a custom field for an activity
September 25, 2014, 11:48:43 pm
I am trying to import an activity with a custom field for country.
I have created the custom field and attached it to the activity.
When I run the import using the attached csv
if I have the country name in the column then I get invalid data, reason: custom_11 is not a valid integer at stage 4: Summary
if I have the country ID in the column then I get invalid data, reason: Invalid value for field(s): Country at stage 3: Preview

I also got the error
Notice: Undefined index: 11 in CRM_Activity_Import_Parser_Activity->import() (line 271 of /home/webeditor/jenkins-node/workspace/buildkit-demos.civicrm.org/build/d7-demo/sites/all/modules/civicrm/CRM/Activity/Import/Parser/Activity.php).
Notice: Undefined index: 11 in CRM_Activity_Import_Parser_Activity->import() (line 274 of /home/webeditor/jenkins-node/workspace/buildkit-demos.civicrm.org/build/d7-demo/sites/all/modules/civicrm/CRM/Activity/Import/Parser/Activity.php).
at stage 4: Summary

I have tested this on the site I am working on which is running 4.4.7
I have also tested this on the demo site

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: Importing a country into a custom field for an activity
September 29, 2014, 12:29:48 pm
ha - that's a pretty special error!

Since you successfully replicated the issue on the demo server, I think you should file a bug, referring to this forum thread.  However, I would try to replicate the problem on the 4.5 demo server (might still be labeled "sandbox"), because the devs are unlikely to devote any work toward a bug that's fixed in a newer version.

Since that's a long-term solution and you most likely need this data sooner than you can upgrade, as a workaround, I'd consider the "API CSV GUI Import" extension.  It's probably installable directly from the CiviCRM extensions directory, but if not: https://civicrm.org/extensions/api-csv-import-gui
Sign up to StackExchange and get free expert CiviCRM advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

Gemma Potaka

  • I’m new here
  • *
  • Posts: 3
  • Karma: 0
  • CiviCRM version: All
  • CMS version: Mostly Drupal
  • MySQL version: Most current
  • PHP version: Most current
Re: Importing a country into a custom field for an activity
October 01, 2014, 07:12:10 pm
Thanks
I went to replicate the error again on the demo site (4.5) this time it didn't fail (ie Import completed with no errors) when I used the country name but the Activity created did not have the country field filled in.
« Last Edit: October 14, 2014, 06:44:52 pm by petednz »

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: Importing a country into a custom field for an activity
October 09, 2014, 10:56:31 am
Hi Gemma,

Sorry, I lost track of this forum thread.  I wanted to say, though: That's definitely a bug worth reporting!  If you report it as a new issue at issues.civicrm.org, and give the steps to replicate it on the demo server, hopefully it's a relatively easy fix.

Jon
Sign up to StackExchange and get free expert CiviCRM advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Importing a country into a custom field for an activity
October 14, 2014, 06:57:31 pm
ticket here https://issues.civicrm.org/jira/browse/CRM-15458
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Importing a country into a custom field for an activity
October 15, 2014, 08:13:36 pm
and due to be fixed by the awesome core team for 4.5.3
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Import (Moderator: Yashodha Chaku) »
  • Importing a country into a custom field for an activity

This forum was archived on 2017-11-26.