Skip to content
Snippets Groups Projects
Commit abb71e13 authored by Sebastian Listl's avatar Sebastian Listl :speech_balloon:
Browse files

Faulty activity was created when merging organization duplicates

parent d7d9b889
No related branches found
No related tags found
No related merge requests found
......@@ -4,7 +4,7 @@ import("system.neon");
import("DuplicateScanner_lib");
let sourceContactId = vars.get("$param.DuplicateCurrentContactId_param");
let targetContactId = vars.get("$sys.selection");
let targetContactId = vars.get("$sys.selection")[0];
//todo the actual merge ought to happen in a separate view where the contact infos can be merged manually by the user.
let mergeSuccess = DuplicateScannerUtils.mergeOrganisation(sourceContactId, targetContactId);
......
......@@ -673,8 +673,8 @@ DuplicateScannerUtils.mergeOrganisation = function(pSourceContactId, pTargetCont
.where("CONTACT.CONTACTID", pSourceContactId)
.cell();
var isLinkedDataUpdated = _DuplicateScannerUtils._migrateLinkedContactData(pSourceContactId, pTargetContactId);
var isParticipantsUpdated = _DuplicateScannerUtils._migrateParticipantsToNewContact("CAMPAIGNPARTICIPANT", "CONTACT_ID", "CAMPAIGN_ID",
_DuplicateScannerUtils._migrateLinkedContactData(pSourceContactId, pTargetContactId);
_DuplicateScannerUtils._migrateParticipantsToNewContact("CAMPAIGNPARTICIPANT", "CONTACT_ID", "CAMPAIGN_ID",
pSourceContactId, pTargetContactId);
var deleteStatements = [];
......@@ -692,7 +692,7 @@ DuplicateScannerUtils.mergeOrganisation = function(pSourceContactId, pTargetCont
DuplicateScannerUtils.deleteCachedDuplicate(pSourceContactId);
return ((isLinkedDataUpdated || isParticipantsUpdated) && deletedRows >= 2);
return deletedRows >= 2;
}
/*
......
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