diff --git a/src/Bundle/ChillPersonBundle/Entity/Person.php b/src/Bundle/ChillPersonBundle/Entity/Person.php index a7e8fec68..d4a8d1beb 100644 --- a/src/Bundle/ChillPersonBundle/Entity/Person.php +++ b/src/Bundle/ChillPersonBundle/Entity/Person.php @@ -642,7 +642,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI /** * Return a collection of participation, where the participation - * is still opened, not a draft, and the period is still opened + * is still opened or in draft state * * @return AccompanyingPeriodParticipation[]|Collection */ @@ -658,12 +658,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI return $this->getAccompanyingPeriodParticipations() ->matching($criteria) ->filter(function (AccompanyingPeriodParticipation $app) { - $period = $app->getAccompanyingPeriod(); - return ( - NULL === $period->getClosingDate() - || new \DateTime('now') < $period->getClosingDate() - ) - && AccompanyingPeriod::STEP_DRAFT !== $period->getStep(); + return AccompanyingPeriod::STEP_CLOSED !== $app->getAccompanyingPeriod()->getStep(); }); }