Workflow: set comment on previous step

This commit is contained in:
Julie Lenaerts 2024-11-20 09:47:11 +01:00
parent 16d5f121db
commit 875d3293d2

View File

@ -434,6 +434,7 @@ class EntityWorkflow implements TrackCreationInterface, TrackUpdateInterface
$previousStep = $this->getCurrentStep(); $previousStep = $this->getCurrentStep();
$previousStep $previousStep
->setComment($transitionContextDTO->comment)
->setTransitionAfter($transition) ->setTransitionAfter($transition)
->setTransitionAt($transitionAt) ->setTransitionAt($transitionAt)
->setTransitionBy($byUser); ->setTransitionBy($byUser);
@ -441,8 +442,6 @@ class EntityWorkflow implements TrackCreationInterface, TrackUpdateInterface
$newStep = new EntityWorkflowStep(); $newStep = new EntityWorkflowStep();
$newStep->setCurrentStep($step); $newStep->setCurrentStep($step);
$newStep->setComment($transitionContextDTO->comment);
foreach ($transitionContextDTO->futureCcUsers as $user) { foreach ($transitionContextDTO->futureCcUsers as $user) {
$newStep->addCcUser($user); $newStep->addCcUser($user);
} }