Details
Description
Custom data is lost when merging under the following conditions
1) the contact being retained already has a row in the table for the custom data group
2) the batch merge api is called with 'check_permissions' where there is no logged in contact or the logged in contact does not have view all custom data.
The value that is being transferred across is lost because the user does not have permission to write to that custom data field. While my focus is on the batch merge without a logged in user or less permissioned user (under custom script) this probably also affects custom data that cannot be seen by the logged in user (but should not be discarded). I replicated the api batch merge variant in a unit test. It's important to note that if the contact being retained does NOT have a row in the custom value table the bug is bypassed by the code that moves referenced rows over.
Attachments
Issue Links
- supplements
-
CRM-19074 Custom field checkboxes migrated incorrectly on merge
- Done/Fixed
- links to