mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
APPS-659
[Upgrade] Search Result points to incorrect link to Folder on Hold
This commit is contained in:
@@ -122,12 +122,13 @@ public class RMv35HoldNewChildAssocPatch extends AbstractModulePatch
|
||||
ASSOC_FROZEN_CONTENT, RegexQNamePattern.MATCH_ALL);
|
||||
for (ChildAssociationRef ref : frozenAssoc)
|
||||
{
|
||||
NodeRef nodeRef = ref.getChildRef();
|
||||
//search the second parent
|
||||
List<ChildAssociationRef> parentAssoc = nodeService.getParentAssocs(ref.getChildRef(), ASSOC_CONTAINS, RegexQNamePattern.MATCH_ALL);
|
||||
List<ChildAssociationRef> parentAssoc = nodeService.getParentAssocs(nodeRef, ASSOC_CONTAINS, RegexQNamePattern.MATCH_ALL);
|
||||
if (parentAssoc.isEmpty())
|
||||
{
|
||||
ChildAssociationRef primaryParentAssoc = nodeService.getPrimaryParent(hold);
|
||||
nodeService.addChild(hold, hold, ASSOC_CONTAINS, primaryParentAssoc.getQName());
|
||||
ChildAssociationRef primaryParentAssoc = nodeService.getPrimaryParent(nodeRef);
|
||||
nodeService.addChild(hold, nodeRef, ASSOC_CONTAINS, primaryParentAssoc.getQName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user