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 »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • Civi Allows Importing of Empty Records When Import is set to "Update" or "Fill"
Pages: [1]

Author Topic: Civi Allows Importing of Empty Records When Import is set to "Update" or "Fill"  (Read 962 times)

Shai

  • I post frequently
  • ***
  • Posts: 202
  • Karma: 8
    • Content2zero
  • CiviCRM version: 4.3.x, 4.4.x, 4.5.x
  • CMS version: Drupal 7
  • MySQL version: 5.5.x
  • PHP version: 5.3.x, 5.4.x
Civi Allows Importing of Empty Records When Import is set to "Update" or "Fill"
May 14, 2012, 07:38:27 pm
Hi Folks,

I'm pretty sure this is a bug; but I'll post here first in case I don't understand something. What I'm about to describe occurred both on a client's D 7.14 / Civi 4.1.2 installation AND at drupal.demo.civicrm.org using the D 7 Civi 4.1 demo.

I'm adding contacts to groups via importing external_id's of the contacts for whom I want to add to a particular group or tag. The import is a CSV of one column only, the external_id. I select "update" or "fill".

In the column of external_id's there are ids that do not exist in my CiviCRM install. My desire and presumption was that Civi would reject these records. Instead, Civi creates a new contact record which is totally empty besides the external_id and the tag or group I added as part of the import.

My assumption that Civi would reject any external_ids that didn't exist in Civi come from two thoughts:

1. Because the UI says "Update" and "Fill" one might think that Civi would NOT create any new contacts. But it does.
2. If I had chosen "Skip" or "No duplicate checking", these records would have been caught as errors with the message "CiviCRM requires Last Name or email address." These records have neither.

Let me know if I'm not setting something right!

[FYI my situation is that I'm migrating a customer from Salsa to Civi and Salsa doesn't clean up after itself when you delete Supporters. So if I delete supporters from Salsa, those supporter_keys are still associated with any groups those supporters had joined. So a dump associating groups with supporter_keys will kick out supporter_keys (which I'm using as the external_ID in Civi) which were not migrated to Civi. It's not cool for Salsa not to clean up after itself on user deletes, but I was hoping that Civi would be smart enough to catch these.)

Thanks for all the great work!!!

Shai Gluskin
Content2zero Web Development
Don't miss out! Sign up now for free expert advice on CiviCRM's new StackExchange help site.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Civi Allows Importing of Empty Records When Import is set to "Update" or "Fill"
May 14, 2012, 08:08:08 pm

Civi updates and/or fills the record IF it finds a match, if not it creates a new record. This "feature request" has come up in the past, but has not been implemented as yet. Not sure why it does not catch and spit out an error message about Last name / email address. Would be great if you can investigate and figure out where the bug is and file an issue with the patch

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Shai

  • I post frequently
  • ***
  • Posts: 202
  • Karma: 8
    • Content2zero
  • CiviCRM version: 4.3.x, 4.4.x, 4.5.x
  • CMS version: Drupal 7
  • MySQL version: 5.5.x
  • PHP version: 5.3.x, 5.4.x
Re: Civi Allows Importing of Empty Records When Import is set to "Update" or "Fill"
May 15, 2012, 05:46:31 am
@lobo,

Thanks for the info. I'm a site builder who dabbles in code. I like to learn and stretch, and I want to contribute to CiviCRM. Could you give me a lead on where to start?

Regarding the practicalities of my current situation, is there any way for me to faster delete empty contact records other than by removing them 100 after a search on all records?

Shai
Don't miss out! Sign up now for free expert advice on CiviCRM's new StackExchange help site.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Civi Allows Importing of Empty Records When Import is set to "Update" or "Fill"
May 15, 2012, 07:12:08 am

http://book.civicrm.org/developer/

If you are in the NY area, you can also attend the co-working event and get help from other folks at the event

http://civicrm.org/civicrm/event/info?reset=1&id=214

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • Civi Allows Importing of Empty Records When Import is set to "Update" or "Fill"

This forum was archived on 2017-11-26.