performant-software / core-data-cloud

Core Data. In the Cloud.
0 stars 1 forks source link

Merge Records #205

Open dleadbetter opened 1 month ago

dleadbetter commented 1 month ago

As a data entry user, I want to assert two records of the same type are the same and merge them together.

Implementation

Allow the user to select two records and elect to merge them. The client will make a request for Record A and Record B and display a dialogue comparing the fields (on the base record) between the two. Users will be allowed to select which field(s) from each record they wish to persist in the new merged record.

The user will then confirm the merge. The client will make a request to a new /merge endpoint with the IDs for Record A and Record B, along with the selected field values for the merged record. The endpoint will update Record A with the new field values, move any non-duplicate relationships from Record B to Record A, and delete Record B.

dleadbetter commented 1 month ago

Tagging @NickLaiacona and @camdendotlol for comments on requirements and implementation.

camdendotlol commented 1 month ago

This looks good to me.

NickLaiacona commented 1 month ago

Regarding duplicate relationships, two relationships might have the same objects on either end but might be joined with different data, such as the XML ID in the case of NBU. If the join data is different, we need a way to combine the join data in order to create a single relationship that preserves all the XML IDs.

dleadbetter commented 1 month ago

Regarding duplicate relationships, two relationships might have the same objects on either end but might be joined with different data, such as the XML ID in the case of NBU. If the join data is different, we need a way to combine the join data in order to create a single relationship that preserves all the XML IDs.

Right, my plan is to do the Merge Record (#205) feature first, then implement the Re-import from FairCopy.cloud (#206) feature. I think this will likely be part of #206 as we won't need or have the XML ID columns for this feature.