MNT-22715 - Document Version Issue (#831)

* MNT-22715 - Document Version Issue - Unexpected: current version does not appear to be 1st version in the list
* Set association index on new version creation
* Unit test to verify the child assoc index is set on versions
* Set association index on new version creation on AGS create record from version
This commit is contained in:
evasques
2021-12-09 13:21:52 +00:00
committed by GitHub
parent aabe395a0c
commit c9e98b4833
3 changed files with 45 additions and 1 deletions

View File

@@ -434,6 +434,7 @@ public class RecordableVersionServiceImpl extends Version2ServiceImpl
QName.createQName(Version2Model.NAMESPACE_URI, Version2Model.CHILD_VERSIONS + "-" + versionNumber),
sourceTypeRef,
null);
nodeService.setChildAssociationIndex(childAssocRef, getAllVersions(versionHistoryRef).size());
versionNodeRef = childAssocRef.getChildRef();
// add aspect with the standard version properties to the 'version' node
@@ -808,6 +809,7 @@ public class RecordableVersionServiceImpl extends Version2ServiceImpl
QName.createQName(Version2Model.NAMESPACE_URI, Version2Model.CHILD_VERSIONS + "-" + versionNumber),
sourceTypeRef,
null);
nodeService.setChildAssociationIndex(childAssocRef, getAllVersions(versionHistoryRef).size());
NodeRef versionNodeRef = childAssocRef.getChildRef();
// add aspect with the standard version properties to the 'version' node