-
-
Notifications
You must be signed in to change notification settings - Fork 825
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CRM-20858: Add Failing Tests to Verify Merging of Custom Fields
If a contact that has values stored in a custom group table is merged into a contact that doesn't have a record in that table, all values in the source target will be merged into the target contact, even if those values were not explicity selected to the merge operation. The merging operation updates all database references from the source contact to the target contact on all tables. When the target contact has a record on a custom group table, this update will fail, since the table's configuration enforces the entity_id (the reference to the contacts table) to be unique. However, when the target contact has no record on that custom group table, the source contact does have a record and the merge is performed, the original record will be updated to reference the target contact, and hence inherit ALL values of the source contact, even if none of the values were selected to be merged. Added two tests, the first one to verify that merging a contact with a record on a custom group table does not merge its values into a target contact with no record in the custom group table; the second one to check that if only some fields of a custom group table are selected to be merged, only those values are copied, leaving all others unset.
- Loading branch information
1 parent
4651a59
commit 29aa8f7
Showing
1 changed file
with
183 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters