From 32224cbee8419c0ecb56fe455035cd6d7fc22159 Mon Sep 17 00:00:00 2001 From: "b.ulrich" <b.ulrich@adito.de> Date: Tue, 12 May 2020 14:42:21 +0200 Subject: [PATCH] [Projekt: Entwicklung - Neon][TicketNr.: 1056190][Campaign_lib: Falsche Reihenfolge bei Datenbankspalten im Array] --- .../participantsdbrecordcontainer/onDBInsert.js | 2 +- process/Campaign_lib/process.js | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/entity/CampaignParticipant_entity/recordcontainers/participantsdbrecordcontainer/onDBInsert.js b/entity/CampaignParticipant_entity/recordcontainers/participantsdbrecordcontainer/onDBInsert.js index bc3712278f..354005207e 100644 --- a/entity/CampaignParticipant_entity/recordcontainers/participantsdbrecordcontainer/onDBInsert.js +++ b/entity/CampaignParticipant_entity/recordcontainers/participantsdbrecordcontainer/onDBInsert.js @@ -8,4 +8,4 @@ var contactId = rowdata["CAMPAIGNPARTICIPANT.CONTACT_ID"]; var campaignParticipantId = vars.get("$local.uid"); var previousCampaignstepId = ""; -CampaignUtils.createLogEntry(campaignId, campaignStepId, contactId, campaignParticipantId, previousCampaignstepId); \ No newline at end of file +CampaignUtils.createLogEntry(campaignId, campaignStepId, campaignParticipantId, previousCampaignstepId); \ No newline at end of file diff --git a/process/Campaign_lib/process.js b/process/Campaign_lib/process.js index c159f8c6c2..f044743612 100644 --- a/process/Campaign_lib/process.js +++ b/process/Campaign_lib/process.js @@ -1,3 +1,4 @@ +import("system.util"); import("system.translate"); import("system.vars"); import("system.db"); @@ -160,8 +161,6 @@ CampaignUtils.getCampaignStatusByCampaignId = function(pCampaignId) * The corresponding campaign id.<br> * @param {String} pCampaignStepId <p> * The current campaign step id.<br> - * @param {String} pContactId <p> - * The contact id,<br> * @param {String} pCampaignParticipantId <p> * The contact id of the campaign participant.<br> * @param {String} pPreviousCampaignStepId <p> @@ -169,11 +168,11 @@ CampaignUtils.getCampaignStatusByCampaignId = function(pCampaignId) * @return {Boolean} <p> * Returns true in case the entry was successfully made.<br> */ -CampaignUtils.createLogEntry = function(pCampaignId, pCampaignStepId, pContactId, pCampaignParticipantId, pPreviousCampaignStepId) +CampaignUtils.createLogEntry = function(pCampaignId, pCampaignStepId, pCampaignParticipantId, pPreviousCampaignStepId) { let colsCampaignParticipantLog = CampaignUtils.getParticipantLogInsertColumnNames(); - let valsCampaignParticipantLog = new Array(pCampaignId, pCampaignStepId, pContactId, pCampaignParticipantId, vars.get("$sys.user"), vars.get("$sys.date"), pPreviousCampaignStepId); + let valsCampaignParticipantLog = new Array(util.getNewUUID(), pCampaignId, pCampaignStepId, pCampaignParticipantId, vars.get("$sys.user"), vars.get("$sys.date"), pPreviousCampaignStepId); let rows = db.insertData("CAMPAIGNPARTICIPANTLOG", colsCampaignParticipantLog, null, valsCampaignParticipantLog); return (rows == 1); @@ -187,7 +186,7 @@ CampaignUtils.createLogEntry = function(pCampaignId, pCampaignStepId, pContactId */ CampaignUtils.getParticipantLogInsertColumnNames = function() { - return ["CAMPAIGNPARTICIPANT_ID", "CAMPAIGN_ID", "CAMPAIGNSTEP_ID", "CAMPAIGNPARTICIPANTLOGID", "USER_NEW", "DATE_NEW", "PREVIOUS_CAMPAIGNSTEP_ID"]; + return ["CAMPAIGNPARTICIPANTLOGID", "CAMPAIGN_ID", "CAMPAIGNSTEP_ID", "CAMPAIGNPARTICIPANT_ID", "USER_NEW", "DATE_NEW", "PREVIOUS_CAMPAIGNSTEP_ID"]; } /** -- GitLab