• Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/lib/integration/crm/timelinemanager.php
  • Класс: BitrixTasksIntegrationCRMTimeLineManager
  • Вызов: TimeLineManager::onTaskViewed
public function onTaskViewed(): self
{
	if (!$this->isAvailable())
	{
		return $this;
	}

	if (
		(int)$this->taskRepository->getTask()->getStatus() !== Status::COMPLETED
		&& $this->userId !== $this->taskRepository->getTask()->getCreatedBy()
		&& $this->userId === $this->taskRepository->getTask()->getResponsibleId()
	)
	{
		$this->eventsController->addEvent(new OnTaskViewed($this->taskRepository->getTask(), $this->userId));
	}

	return $this;
}