Update the form to allow sending a workflow to an external destinee

OP#734 Modification du formulaire pour permettre l'envoi d'un workflow

https://champs-libres.openproject.com/work_packages/734
This commit is contained in:
2024-10-03 17:29:27 +02:00
parent da6589ba87
commit 071c5e3c55
7 changed files with 100 additions and 1 deletions

View File

@@ -462,6 +462,13 @@ class EntityWorkflow implements TrackCreationInterface, TrackUpdateInterface
}
}
foreach ($transitionContextDTO->futureDestineeThirdParties as $thirdParty) {
new EntityWorkflowSend($newStep, $thirdParty, $transitionAt->add(new \DateInterval('P30D')));
}
foreach ($transitionContextDTO->futureDestineeEmails as $email) {
new EntityWorkflowSend($newStep, $email, $transitionAt->add(new \DateInterval('P30D')));
}
// copy the freeze
if ($this->isFreeze()) {
$newStep->setFreezeAfter(true);

View File

@@ -115,6 +115,7 @@ class EntityWorkflowStep
/**
* @var Collection<int, EntityWorkflowSend>
*/
#[ORM\OneToMany(mappedBy: 'entityWorkflowStep', targetEntity: EntityWorkflowSend::class, cascade: ['persist'], orphanRemoval: true)]
private Collection $sends;
public function __construct()