...Человеческий поиск в разработке...
- Модуль: tasks
- Путь к файлу: ~/bitrix/modules/tasks/lib/copy/implement/task.php
- Класс: BitrixTasksCopyImplementTask
- Вызов: Task::copyChildTasks
private function copyChildTasks($taskId, $copiedTaskId) { if (!$this->taskCopier) { return new Result(); } $filter = ["PARENT_ID" => $taskId]; $groupId = $this->getGroupIdByTaskId($taskId); if ($groupId) { $filter["GROUP_ID"] = $groupId; } $containerCollection = new ContainerCollection(); $queryObject = $this->getList([], $filter, ["ID"]); while ($task = $queryObject->fetch()) { $container = new Container($task["ID"]); $container->setParentId($copiedTaskId); $containerCollection[] = $container; } if (!$containerCollection->isEmpty()) { return $this->taskCopier->copy($containerCollection); } return new Result(); }