...Человеческий поиск в разработке...
- Модуль: tasks
- Путь к файлу: ~/bitrix/modules/tasks/lib/dispatcher/publicaction/task.php
- Класс: BitrixTasksDispatcherPublicActionTask
- Вызов: Task::setOriginator
public function setOriginator($id, $originatorId) { $result = []; $oldTask = TaskModel::createFromId($id); $newTask = clone $oldTask; $members = $newTask->getMembers(); $members[RoleDictionary::ROLE_DIRECTOR] = []; $members[RoleDictionary::ROLE_DIRECTOR][] = (int)$originatorId; $newTask->setMembers($members); if (!(new TaskAccessController($this->userId))->check(ActionDictionary::ACTION_TASK_CHANGE_DIRECTOR, $oldTask, $newTask)) { $this->addForbiddenError(); return $result; } $task = CTaskItem::getInstance($id, UtilUser::getId()); $task->update(array('CREATED_BY' => $originatorId)); return $result; }