From 3d2ac7cd6c1fa56f8719cdb6196c2d0a77603baa Mon Sep 17 00:00:00 2001 From: "j.goderbauer" <j.goderbauer@adito.de> Date: Tue, 5 Nov 2019 08:44:37 +0100 Subject: [PATCH] Importer-mapping-functions: iComm used wrong (-> old) column for is-it-standard-flag --- process/ImporterMappingFunctions_lib/process.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/process/ImporterMappingFunctions_lib/process.js b/process/ImporterMappingFunctions_lib/process.js index 47f80a6506..496ae5c71a 100644 --- a/process/ImporterMappingFunctions_lib/process.js +++ b/process/ImporterMappingFunctions_lib/process.js @@ -15,10 +15,10 @@ import("Importer_lib"); // TODO: use SqlBuilder /* -┌───────────────────────────────────────────────────────────────┠-│ toolkit methods for the import handler │ -│ DO NOT TOUCH - use lib_importerCustomMappingFunctions │ -└───────────────────────────────────────────────────────────────┘ ++---------------------------------------------------------------+ +¦ toolkit methods for the import handler ¦ +¦ DO NOT TOUCH - use lib_importerCustomMappingFunctions ¦ ++---------------------------------------------------------------+ */ /* @@ -366,13 +366,13 @@ function iComm(pObject) { if(!address || !medium || !contact) return true; var sql = "select " + this.getColumnCase("communicationid") + " from " + this.getTableCase("communication") - +" where " + this.getColumnCase("contact_id") + " = ? and " + this.getColumnCase("medium_id") + " = ? and " - + this.getColumnCase("isstandard") + " = ? and " + this.getColumnCase("addr") + " = ?" + +" where " + this.getColumnCase("contact_id") + " = ? and " + this.getColumnCase("medium_id") + " = ? and " + + this.getColumnCase("isstandard") + " = ? and " + this.getColumnCase("addr") + " = ?" var id = db.cell([sql, [[contact, SQLTYPES.CHAR], [medium, SQLTYPES.CHAR], //TODO: define types dynamically and not hardcoded [standard, SQLTYPES.SMALLINT], [address, SQLTYPES.VARCHAR]]], this.Config.AliasTo); if (id == "" || id == null) { var columns = [this.getColumnCase("communicationid"), this.getColumnCase("addr"), - this.getColumnCase("medium_id"), this.getColumnCase("contact_id"), this.getColumnCase("isstandard")]; + this.getColumnCase("medium_id"), this.getColumnCase("contact_id"), this.getColumnCase("isstandard")]; this.insertData(this.getTableCase("communication"), columns, null, [util.getNewUUID(), address, medium, contact, standard], this.Config.AliasTo); } return true; -- GitLab