You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Editing the branch name of a versioned folder will work, but all descendent models do not share the new branch name. This then means all paths are incorrect, despite the fact that they still work - but they are inconsistent.
Steps to reproduce
Create a Versioned Folder main branch, then a branched copy called something different e.g. anotherBranch
In MDM UI, edit the branch name to differentBranch b. Or send this HTTP request:
PUT /api/versionedFolders/{versionedFolderId}
{
"id":"a15d8603-6cf6-4675-9d6b-338f9b720589",
"domainType":"VersionedFolder",
"label":"Test Versioned Folder",
"branchName":"differentBranch"
}
Notice that 200 OK is returned.
Now check a model below that versioned folder and notice the branch name is still anotherBranch
Expected behavior
All model branch names below the versioned folder should also be updated.
I'm going to put this issue on hold due to the complexity I've discovered in trying to fix this.
@jamesrwelch pointed out the ModelService.updateModelItemPathsAfterFinalisationOfModel() methods as an example of what to do, which involve something similar with finalisation and updating related paths after a change in path model identifier (which would be similar in this case). What happens here is:
Provide a list of database tables per model service to bulk update
Perform a custom SQL UPDATE query which directly modifies the database. In this case, the path column is altered.
So for this bug to be fixed, a similar approach would theoretically work, but the UPDATE query would alter the branch name of models, the paths of models (because the branch name is included in the paths), and all the paths of model items too , because their paths also include the branch name.
But this raises the complexity, because:
We need to identify all the models under the VersionedFolder being changed - changing the branch name and path.
We also need to identify all the sub-folders under the VersionedFolder, then repeat step 1 for every sub-folder found.
We then also need to update every possible model item under every model under the VersionedFolder - changing the path of each record.
For the data dictionary, that is a huge amount of items to update, which will no doubt negatively affect performance. Plus the scope of work will touch every model domain under mdm-core.
We do not have the capacity to build and test this at the moment, so it must be an improvement planned for the future.
Description
Editing the branch name of a versioned folder will work, but all descendent models do not share the new branch name. This then means all paths are incorrect, despite the fact that they still work - but they are inconsistent.
Steps to reproduce
main
branch, then a branched copy called something different e.g.anotherBranch
differentBranch
b. Or send this HTTP request:200 OK
is returned.anotherBranch
Expected behavior
All model branch names below the versioned folder should also be updated.
Related
The text was updated successfully, but these errors were encountered: