duplicateChildTasks
CTaskItem[] CTaskItem::duplicateChildTasks( $cloneTaskInstance )
This method copies subtasks for the selected task.
Returned value
This method returns an array of copied [link=32362]CTaskItem[/link] class instances.
Method parameters
Parameter | Description |
---|---|
$cloneTaskInstance | Task, which subtasks will be copied. |
Example of use
CModule::IncludeMOdule('tasks'); $donorTaskId = 1373; $acceptorTaskId = 1379; $executiveUserId = $GLOBALS['USER']->GetId(); // creating task instance $donorTaskInstance = CTaskItem::getInstance($donorTaskId, $executiveUserId); $acceptorTaskInstance = CTaskItem::getInstance($acceptorTaskId, $executiveUserId); $subTasks = $donorTaskInstance-> duplicateChildTasks($acceptorTaskInstance); print_r($subTasks);
© «Bitrix24», 2001-2024