dev/core#2039 Fix merge code so that deleted contacts are not left without a primary...
authoreileen <emcnaughton@wikimedia.org>
Tue, 22 Sep 2020 02:43:29 +0000 (14:43 +1200)
committereileen <emcnaughton@wikimedia.org>
Mon, 12 Oct 2020 10:05:40 +0000 (23:05 +1300)
commit2203317f53dfcbe7a94813fd4943fdb373d6f150
treef4860d62ed1948a0f518608c8dfdbedfe12b2f43
parentfcc2788045d28778606daf53c92e20bef1805002
dev/core#2039 Fix merge code so that deleted contacts are not left without a primary address

This was picked up in tests to ensure that removing a line of code creating excessing queries
would not cause regressions.

https://lab.civicrm.org/dev/core/-/issues/2039

I considered altering the test to exclude deleted contacts but we run the risk that if a contact
is undeleted they will have no primary address so I figured the integrity makes sense.

Note there are a couple of queries in this code that can go (retrieving stuff
we already have) - depending how I go on getting review on this & related tidy up I'll remove them
in a later PR
CRM/Dedupe/MergeHandler.php
CRM/Dedupe/Merger.php
tests/phpunit/api/v3/JobTest.php