improves import record update/duplicate count
authorPhilipp Schüle <p.schuele@metaways.de>
Fri, 26 Aug 2016 13:38:56 +0000 (15:38 +0200)
committerPhilipp Schüle <p.schuele@metaways.de>
Mon, 29 Aug 2016 08:05:00 +0000 (10:05 +0200)
Change-Id: Ib528e72a30ef39351670fddbfbd6d77aca67eb09
Reviewed-on: http://gerrit.tine20.com/customers/3489
Tested-by: Jenkins CI (http://ci.tine20.com/)
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
tine20/Tinebase/Import/Abstract.php

index 6225ae6..f7b9804 100644 (file)
@@ -1040,6 +1040,9 @@ abstract class Tinebase_Import_Abstract implements Tinebase_Import_Interface
                         . ' Merged record: ' . print_r($record->toArray(), TRUE));
                     
                     $record = call_user_func(array($this->_controller, $this->_options['updateMethod']), $recordToUpdate, FALSE);
+                    $this->_importResult['updatecount']++;
+                } else {
+                    $this->_importResult['duplicatecount']++;
                 }
                 
                 break;
@@ -1165,9 +1168,7 @@ abstract class Tinebase_Import_Abstract implements Tinebase_Import_Interface
                             . " Records are already the same. Nothing to do here.");
                     } else {
                         $updatedRecord = $this->_importAndResolveConflict($firstDuplicateRecord, $resolveStrategy, $ted->getClientRecord());
-                        $this->_importResult['updatecount']++;
                         $this->_importResult['results']->addRecord($updatedRecord);
-
                     }
                 }