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