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:
@@ -10,7 +10,7 @@
|
|||||||
parent="rm.parentModulePatch"
|
parent="rm.parentModulePatch"
|
||||||
class="org.alfresco.module.org_alfresco_module_rm.patch.v35.RMv35HoldNewChildAssocPatch">
|
class="org.alfresco.module.org_alfresco_module_rm.patch.v35.RMv35HoldNewChildAssocPatch">
|
||||||
<property name="description" value="Create new hold child association to link the record to the hold"/>
|
<property name="description" value="Create new hold child association to link the record to the hold"/>
|
||||||
<property name="fixesFromSchema" value="3201" />
|
<property name="fixesFromSchema" value="2400" />
|
||||||
<property name="fixesToSchema" value="3500"/>
|
<property name="fixesToSchema" value="3500"/>
|
||||||
<property name="behaviourFilter" ref="policyBehaviourFilter" />
|
<property name="behaviourFilter" ref="policyBehaviourFilter" />
|
||||||
<property name="filePlanService" ref="filePlanService" />
|
<property name="filePlanService" ref="filePlanService" />
|
||||||
|
@@ -122,12 +122,13 @@ public class RMv35HoldNewChildAssocPatch extends AbstractModulePatch
|
|||||||
ASSOC_FROZEN_CONTENT, RegexQNamePattern.MATCH_ALL);
|
ASSOC_FROZEN_CONTENT, RegexQNamePattern.MATCH_ALL);
|
||||||
for (ChildAssociationRef ref : frozenAssoc)
|
for (ChildAssociationRef ref : frozenAssoc)
|
||||||
{
|
{
|
||||||
|
NodeRef nodeRef = ref.getChildRef();
|
||||||
//search the second parent
|
//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())
|
if (parentAssoc.isEmpty())
|
||||||
{
|
{
|
||||||
ChildAssociationRef primaryParentAssoc = nodeService.getPrimaryParent(hold);
|
ChildAssociationRef primaryParentAssoc = nodeService.getPrimaryParent(nodeRef);
|
||||||
nodeService.addChild(hold, hold, ASSOC_CONTAINS, primaryParentAssoc.getQName());
|
nodeService.addChild(hold, nodeRef, ASSOC_CONTAINS, primaryParentAssoc.getQName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user