mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Fixed ALF-4185: Patch patch.emailInviteAndNotifyTemplatesFolder fails
- Cycle through found templates (even if empty) and move them git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@22310 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -282,11 +282,15 @@ public class EmailTemplatesInviteAndNotifyFoldersPatch extends AbstractPatch {
|
||||
|
||||
//move template
|
||||
String xpath = emaiemailTemplatesFolderXPath + "/cm:" + templateName;
|
||||
List<NodeRef> templateNodeRef = searchService.selectNodes(emailTemplatesFolderNodeRef, xpath, null, namespaceService, false);
|
||||
if (templateNodeRef != null)
|
||||
List<NodeRef> templateNodeRefs = searchService.selectNodes(emailTemplatesFolderNodeRef, xpath, null, namespaceService, false);
|
||||
for (NodeRef templateNodeRef : templateNodeRefs)
|
||||
{
|
||||
nodeService.moveNode(templateNodeRef.get(0), createdFolderNodeRef, ContentModel.ASSOC_CHILDREN,
|
||||
nodeService.getPrimaryParent(templateNodeRef.get(0)).getQName());
|
||||
QName qname = nodeService.getPrimaryParent(templateNodeRef).getQName();
|
||||
nodeService.moveNode(
|
||||
templateNodeRef,
|
||||
createdFolderNodeRef,
|
||||
ContentModel.ASSOC_CHILDREN,
|
||||
qname);
|
||||
}
|
||||
|
||||
return createdFolderNodeRef;
|
||||
|
Reference in New Issue
Block a user