don't show duplicates as failures in import summary
authorPhilipp Schüle <p.schuele@metaways.de>
Wed, 13 Apr 2016 14:42:07 +0000 (16:42 +0200)
committerPhilipp Schüle <p.schuele@metaways.de>
Tue, 19 Apr 2016 15:37:31 +0000 (17:37 +0200)
Change-Id: I30ce6908787035985993017bb7014e9aaeb93b45
Reviewed-on: http://gerrit.tine20.com/customers/3047
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
Tested-by: Philipp Schüle <p.schuele@metaways.de>
tine20/Tinebase/js/widgets/dialog/ImportDialog.js

index 9a46456..5b69a88 100644 (file)
@@ -698,7 +698,7 @@ Tine.widgets.dialog.ImportDialog = Ext.extend(Tine.widgets.dialog.WizardPanel, {
                     
                     this.fireEvent('finish', this, this.layout.activeItem);
                     
-                    if (Ext.isArray(response.exceptions) && response.exceptions.length > 0) {
+                    if (response.failcount > 0 && Ext.isArray(response.exceptions) && response.exceptions.length > 0) {
                         // show errors and fence finish/back btn
                         this.backButton.setDisabled(true);
                         this.finishButton.setHandler(function() {this.window.close()}, this);
@@ -707,7 +707,7 @@ Tine.widgets.dialog.ImportDialog = Ext.extend(Tine.widgets.dialog.WizardPanel, {
                         this.exceptionStore.clearFilter(true);
                         
                         this.summaryPanelFailures.show();
-                        this.summaryPanelFailures.setTitle(String.format(_('{0} records had failures and where discarded.'), response.exceptions.length));
+                        this.summaryPanelFailures.setTitle(String.format(_('{0} records had failures and where discarded.'), response.failcount));
                     } else {
                         this.window.close();
                     }