mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Fixed test script to handle the extra isNewNode flag for onCreateChildAssociation
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6005 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -26,15 +26,17 @@ if (behaviour.args == null)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (behaviour.args.length == 1)
|
if (behaviour.args.length == 2)
|
||||||
{
|
{
|
||||||
var childAssoc = behaviour.args[0];
|
var childAssoc = behaviour.args[0];
|
||||||
|
var isNewNode = behaviour.args[1];
|
||||||
logger.log("Assoc type: " + childAssoc.type);
|
logger.log("Assoc type: " + childAssoc.type);
|
||||||
logger.log("Assoc name: " + childAssoc.name);
|
logger.log("Assoc name: " + childAssoc.name);
|
||||||
logger.log("Parent node: " + childAssoc.parent.id);
|
logger.log("Parent node: " + childAssoc.parent.id);
|
||||||
logger.log("Child node: " + childAssoc.child.id);
|
logger.log("Child node: " + childAssoc.child.id);
|
||||||
logger.log("Is primary: " + childAssoc.isPrimary());
|
logger.log("Is primary: " + childAssoc.isPrimary());
|
||||||
logger.log("Nth sibling: " + childAssoc.nthSibling);
|
logger.log("Nth sibling: " + childAssoc.nthSibling);
|
||||||
|
logger.log("Is new node: " + isNewNode);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -45,7 +47,10 @@ else
|
|||||||
|
|
||||||
if (scriptFailed == false)
|
if (scriptFailed == false)
|
||||||
{
|
{
|
||||||
|
if (isNewNode == true)
|
||||||
|
{
|
||||||
childAssoc.child.addAspect("cm:versionable");
|
childAssoc.child.addAspect("cm:versionable");
|
||||||
childAssoc.child.save();
|
childAssoc.child.save();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user