Stage::addStages

  1. Bitrix24 API (v. 23.675.0)
  2. tasks
  3. Stage
  4. addStages
  • Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/lib/copy/implement/stage.php
  • Класс: BitrixTasksCopyImplementStage
  • Вызов: Stage::addStages
public function addStages($taskId, array $stageIds)
{
	$result = [];

	foreach ($stageIds as $oldId => $stageId)
	{
		$fields = [
			"TASK_ID" => $taskId,
			"STAGE_ID" => $stageId
		];
		if (!TaskStageTable::getList(["filter" => $fields])->fetch())
		{
			$addResult = TaskStageTable::add($fields);
			$result[$oldId] = ($addResult->isSuccess() ? $addResult->getId() : false);
		}
	}

	return $result;
}

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