From 4c9ea740c8c381659d59585b34c6d3e22f871201 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Thu, 19 Oct 2023 11:44:53 +0200 Subject: [PATCH] [export] fix date range selection on filtre and grouping "by status of the course at date" on accompanying periods --- .changes/unreleased/Fixed-20231019-114350.yaml | 6 ++++++ .../AccompanyingCourseAggregators/StepAggregator.php | 2 +- .../Filter/AccompanyingCourseFilters/StepFilterOnDate.php | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 .changes/unreleased/Fixed-20231019-114350.yaml diff --git a/.changes/unreleased/Fixed-20231019-114350.yaml b/.changes/unreleased/Fixed-20231019-114350.yaml new file mode 100644 index 000000000..dbb6b4166 --- /dev/null +++ b/.changes/unreleased/Fixed-20231019-114350.yaml @@ -0,0 +1,6 @@ +kind: Fixed +body: '[export] fix date range selection on filter and grouping "by status of the + course at date", on accompanying periods' +time: 2023-10-19T11:43:50.455829748+02:00 +custom: + Issue: "177" diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/StepAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/StepAggregator.php index dd5c26371..a9439a63f 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/StepAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/StepAggregator.php @@ -49,7 +49,7 @@ final readonly class StepAggregator implements AggregatorInterface $qb->expr()->lte(self::A.'.startDate', ':'.self::P), $qb->expr()->orX( $qb->expr()->isNull(self::A.'.endDate'), - $qb->expr()->lt(self::A.'.endDate', ':'.self::P) + $qb->expr()->gt(self::A.'.endDate', ':'.self::P) ) ) ) diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/StepFilterOnDate.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/StepFilterOnDate.php index bca812b86..66355e44d 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/StepFilterOnDate.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/StepFilterOnDate.php @@ -61,7 +61,7 @@ class StepFilterOnDate implements FilterInterface $qb->expr()->lte(self::A.'.startDate', ':'.self::P), $qb->expr()->orX( $qb->expr()->isNull(self::A.'.endDate'), - $qb->expr()->lt(self::A.'.endDate', ':'.self::P) + $qb->expr()->gt(self::A.'.endDate', ':'.self::P) ) ) )