dev/core#2057 Remove extraneous activity contact queries on activity update
authoreileen <emcnaughton@wikimedia.org>
Mon, 28 Sep 2020 10:06:26 +0000 (23:06 +1300)
committereileen <emcnaughton@wikimedia.org>
Thu, 1 Oct 2020 06:03:16 +0000 (19:03 +1300)
commit66cbbfb6c7d23527dd067b050e6df64b4dc3dfef
tree6eeb5b9b26fcb9819d8c0d7f23b637e755f4cf6b
parent29ff32ead9cc14f8476f037298c9dbdd32f9a201
dev/core#2057 Remove extraneous activity contact queries on activity update

This changes it so that instead of doing either

1) if passing in an array of activity contacts for a given type then attempt
to delete existing contacts, regardless of whether they are the same as the
existing ones, create new ones

OR

2) if the param is an int then do a lookup, per record type, and update if needed to

- Do one query to find existing records of types to be deleted (for all 3 record types).
Only delete activity contact records that are not to be kept and
don't alter those records that should be retained
CRM/Activity/BAO/Activity.php