mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Merged HEAD-BUG-FIX to HEAD (4.2)
55492: MNT-9647: Merged V4.1-BUG-FIX (4.1.7) to HEAD-BUG-FIX (4.2) 55055: MNT-9446 : Share working copy nodes assume cm:original association is present - Using "cm:workingcopylink" association instead of "cm:original" git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@55794 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -59,19 +59,28 @@ var Evaluator =
|
|||||||
// Working Copy?
|
// Working Copy?
|
||||||
if (node.hasAspect("{http://www.alfresco.org/model/content/1.0}workingcopy"))
|
if (node.hasAspect("{http://www.alfresco.org/model/content/1.0}workingcopy"))
|
||||||
{
|
{
|
||||||
var wcNode = node.assocs["cm:original"][0];
|
var wcLink = node.sourceAssocs["cm:workingcopylink"];
|
||||||
workingCopy["isWorkingCopy"] = true;
|
var isWorkingCopy = wcLink != null;
|
||||||
workingCopy["sourceNodeRef"] = wcNode.nodeRef;
|
if (isWorkingCopy)
|
||||||
if (wcNode.hasAspect("{http://www.alfresco.org/model/content/1.0}versionable"))
|
|
||||||
{
|
{
|
||||||
workingCopy["workingCopyVersion"] = wcNode.properties["cm:versionLabel"];
|
var wcNode = wcLink[0];
|
||||||
}
|
workingCopy["isWorkingCopy"] = true;
|
||||||
|
workingCopy["sourceNodeRef"] = wcNode.nodeRef;
|
||||||
|
if (wcNode.hasAspect("{http://www.alfresco.org/model/content/1.0}versionable"))
|
||||||
|
{
|
||||||
|
workingCopy["workingCopyVersion"] = wcNode.properties["cm:versionLabel"];
|
||||||
|
}
|
||||||
|
|
||||||
// Google Doc?
|
// Google Doc?
|
||||||
if (node.hasAspect("{http://www.alfresco.org/model/googledocs/1.0}googleResource"))
|
if (node.hasAspect("{http://www.alfresco.org/model/googledocs/1.0}googleResource"))
|
||||||
|
{
|
||||||
|
// Property is duplicated here for convenience
|
||||||
|
workingCopy["googleDocUrl"] = node.properties["gd:url"];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
// Property is duplicated here for convenience
|
logger.error("Node: " + node.nodeRef +" hasn't \"cm:workingcopylink\" association");
|
||||||
workingCopy["googleDocUrl"] = node.properties["gd:url"];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Locked?
|
// Locked?
|
||||||
|
Reference in New Issue
Block a user