MauroDataMapper / mdm-core

The backend of MDM
Apache License 2.0
7 stars 3 forks source link

Record the merging of a versioned folder into the individual target items #475

Closed pjmonks closed 4 months ago

pjmonks commented 4 months ago

Description

When a versioned folder is merged into a target versioned folder, currently an overall commit message is recorded on the target VF to represent the change history.

This should be extended to add a history record to each individual item that was changed in the target VF too. This will highlight at a more granular level how the merge affected the VF.

Merge operation

The VersionedFolderService.mergeObjectPatchDataIntoVersionedFolder() method has three top level operations to take care of for every patched item/field change:

For each one, a new history record should be added as each catalogue item is changed/created using the EditHistoryAware trait. The EditTitle.MERGE enum should be used along with a suitable description referencing the source versioned folder that caused the change, e.g.

Created and updated items

As items are created (copied) or modified in the target versioned folder, the history should be added directly to that new/updated item in question.

Deleted items

Where items have been deleted from the target versioned folder, the history item should be added to the parent item that used to own the child deleted item.