Skip to content
Snippets Groups Projects
Commit 3d2ac7cd authored by Johannes Goderbauer's avatar Johannes Goderbauer Committed by Benjamin Ulrich
Browse files

Importer-mapping-functions: iComm used wrong (-> old) column for is-it-standard-flag

parent eaeadec6
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment