Task::updateDepends

  1. Bitrix24 API (v. 23.675.0)
  2. tasks
  3. Task
  4. updateDepends
  • Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/lib/control/task.php
  • Класс: BitrixTasksControlTask
  • Вызов: Task::updateDepends
private function updateDepends(array $fields)
{
	if (array_key_exists('DEPENDS_ON', $fields))
	{
		$dependence = new Dependence($this->userId, $this->taskId);
		$dependence->setPrevious($fields['DEPENDS_ON']);
	}

	// backward compatibility with PARENT_ID
	if (array_key_exists('PARENT_ID', $fields))
	{
		// PARENT_ID changed, reattach subtree from previous location to new one
		BitrixTasksInternalsHelperTaskDependence::attach($this->taskId, intval($fields['PARENT_ID']));
	}

	if (
		$this->shiftResult
		&& $this->correctDatePlanDependent
	)
	{
		$saveResult = $this->shiftResult->save(array('!ID' => $this->taskId));
		if ($saveResult->isSuccess())
		{
			$this->legacyOperationResultData['SHIFT_RESULT'] = $this->shiftResult->exportData();
		}
	}
}

Добавить комментарий