i did a bulk import of a salesforce object to Drupal node, and the screen which is shown after the import is complete, shows a long list of messages, e.g.

- Updated node 54
- Updated node 55
- Created node 27
- Updated node 56
- Updated node 57

The only node I had which existed before the import was node 27, so clearly the output is showing Updated when it means Created and Created when it actually means Updated.

CommentFileSizeAuthor
#3 1089652-createdupdatedreversed.patch555 bytesdpearcefl

Comments

kostajh’s picture

Is this still occurring in the latest 6.x-2.x-dev? I haven't noticed the issue.

dpearcefl’s picture

Yes, it is still happening.

dpearcefl’s picture

Status: Active » Needs review
StatusFileSize
new555 bytes

Here is what I found:

$created = isset($existing[$record['Id']]);
(snip)
$context['results'][] = ($created ? 'Created' : 'Updated') . ' ' . l($type . ' ' . $oid, $type . '/' . $oid);

So if the SFID is set (the record is already linked and therefore exists), $created is set to TRUE
Which means $context['results'][] is set to 'Created'.
Oops

Patch attached.

kostajh’s picture

Looks good. Did you test, I assume it works correctly now?

dpearcefl’s picture

Tested and works fine. ;-)

kostajh’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.