Change logic for triggering notification when task is edited and assigned a new user

This commit is contained in:
2025-09-29 15:56:12 +02:00
parent 2434d91e4a
commit c731f1967b

View File

@@ -180,7 +180,7 @@ final class SingleTaskController extends AbstractController
$em = $this->managerRegistry->getManager(); $em = $this->managerRegistry->getManager();
$em->persist($task); $em->persist($task);
if (null !== $task->getAssignee()) { if ($initialAssignee !== $task->getAssignee()) {
$this->eventDispatcher->dispatch( $this->eventDispatcher->dispatch(
new AssignTaskEvent($task, $initialAssignee), new AssignTaskEvent($task, $initialAssignee),
AssignTaskEvent::PERSIST AssignTaskEvent::PERSIST