Add user group support in entity workflow steps

Enhanced the WorkflowTransitionContextDTO to include user groups alongside individual users for future steps. Updated the relevant entity and form classes to accommodate this change and included the necessary database migration script.
This commit is contained in:
2024-09-26 15:35:40 +02:00
parent 82cd77678b
commit 17f4c85fa5
5 changed files with 92 additions and 6 deletions

View File

@@ -442,10 +442,14 @@ class EntityWorkflow implements TrackCreationInterface, TrackUpdateInterface
$newStep->addCcUser($user);
}
foreach ($transitionContextDTO->futureDestUsers as $user) {
foreach ($transitionContextDTO->getFutureDestUsers() as $user) {
$newStep->addDestUser($user);
}
foreach ($transitionContextDTO->getFutureDestUserGroups() as $userGroup) {
$newStep->addDestUserGroup($userGroup);
}
if (null !== $transitionContextDTO->futureUserSignature) {
$newStep->addDestUser($transitionContextDTO->futureUserSignature);
}