From 3b9284c91adb5007e41f4078177968bbe9e3acb4 Mon Sep 17 00:00:00 2001 From: Marcel Klehr Date: Mon, 22 Jun 2026 10:21:55 +0200 Subject: [PATCH] fix(AssignmentsService): Do not run assignments whose sessions have pending actions Signed-off-by: Marcel Klehr --- lib/Service/AssignmentsService.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/Service/AssignmentsService.php b/lib/Service/AssignmentsService.php index 8525f823..82095488 100644 --- a/lib/Service/AssignmentsService.php +++ b/lib/Service/AssignmentsService.php @@ -118,6 +118,10 @@ public function scheduleAssignmentRun(?string $userId, int $assignmentId): void } catch (MultipleObjectsReturnedException $e) { throw new InternalException(previous: $e); } + if ($session->getAgencyPendingActions() !== null) { + $this->logger->debug('Skipping assignment run as the last run still has pending actions'); + return; + } $assignment = $this->assignmentMapper->find($userId, $assignmentId); $assignment->setLastRunAt($this->timeFactory->now()->getTimestamp()); $this->assignmentMapper->update($assignment);