NestedIntervalUtils - closeWholeProject(Object topTaskNode, Object taskKeyVals)

Closes all the tasks for a given root.

Table 1. Parameters
Name Type Description
topTaskNode Object sys_id of the top task or root of the project. It is the responsibility of the caller to obtain the top task of a project and pass it in the call.
taskKeyVals Object Key/value pairs to be set for each task under the project.
Table 2. Returns
Type Description
Integer Maximum level value

Use in a business rule that is expecting to close all the tasks for a project

var tree = new SNC.NestedIntervalUtilities("planned_task");
var taskKeyVals = new Object();
var nowTime = gs.nowDateTime();
var taskKeyVals = {state:"3", work_end:nowTime};
tree.closeWholeProject(current, taskKeyVals);