0

I had a glitch in a script that caused some unwanted contact merges to happen programmatically:

$result = civicrm_api3('Contact', 'merge', [ 'to_remove_id' => $existingContactId, 'to_keep_id' => $contactId, 'mode' => "aggressive",]);

Fortunately, I had the Detailed Logging setting enabled. In theory, I could pull the change log for each unwanted merge and "revert" the merge. Does anyone know of an extension or script I can look at to accomplish this?

3
  • There is an answer here which says you should be able to do this via the Change Log - but I just gave this a whirl on dmaster and did not find any options to do so. civicrm.stackexchange.com/questions/41703/…
    – petednz - fuzion
    Commented Aug 11, 2022 at 20:11
  • It's there. See the button at the bottom here. dmaster.demo.civicrm.org/civicrm/report/instance/…. To get there click on the change log tab for dmaster.demo.civicrm.org/civicrm/contact/…, then drill down on the Contact Merge entry.
    – Demerit
    Commented Aug 11, 2022 at 20:50
  • hmm that link isn't working for me, even if i try just going to civicrm/report/instance/37?reset=1 without the contact IDs in it. I tried merging another couple of contacts but still not getting any results. was report=37 one you created? what is the basis of the report? or perhaps you could expand on your comment as an Answer with s'shots?
    – petednz - fuzion
    Commented Aug 12, 2022 at 20:11

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.