diff --git a/.changes/unreleased/Fixed-20240916-155150.yaml b/.changes/unreleased/Fixed-20240916-155150.yaml new file mode 100644 index 000000000..52382db20 --- /dev/null +++ b/.changes/unreleased/Fixed-20240916-155150.yaml @@ -0,0 +1,6 @@ +kind: Fixed +body: | + Correctly compute the grouping by referrer aggregator +time: 2024-09-16T15:51:50.268336979+02:00 +custom: + Issue: "309" diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ReferrerScopeAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ReferrerScopeAggregator.php index c183cff70..3525538fd 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ReferrerScopeAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ReferrerScopeAggregator.php @@ -56,7 +56,7 @@ readonly class ReferrerScopeAggregator implements AggregatorInterface, DataTrans $qb->expr()->gte('COALESCE(acp.closingDate, CURRENT_TIMESTAMP())', "{$p}_userHistory.startDate"), $qb->expr()->orX( $qb->expr()->isNull("{$p}_userHistory.endDate"), - $qb->expr()->lt('COALESCE(acp.closingDate, CURRENT_TIMESTAMP())', "{$p}_userHistory.endDate") + $qb->expr()->lt('COALESCE(acp.openingDate, CURRENT_TIMESTAMP())', "{$p}_userHistory.endDate") ) ), $qb->expr()->andX(