From ca6fde934b4e7b59bf4b375e1ca5113745fdb4eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Wed, 21 Sep 2022 16:14:07 +0200 Subject: [PATCH] [export][person] Fixed: fixed inconsistency in requestor query A condition was not present in a subquery, causing to take all courses into account, not the one concerned by the filter --- .../Filter/AccompanyingCourseFilters/RequestorFilter.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/RequestorFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/RequestorFilter.php index c0338b42e..e81cf3114 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/RequestorFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/RequestorFilter.php @@ -70,10 +70,6 @@ final class RequestorFilter implements FilterInterface case 'other_person': $expr = $this->em->getExpressionBuilder(); - if (!in_array('acppart', $qb->getAllAliases(), true)) { - $qb->join('acp.participations', 'acppart'); - } - $clause = $expr->andX( $expr->isNotNull('acp.requestorPerson'), $expr->notIn( @@ -85,6 +81,7 @@ final class RequestorFilter implements FilterInterface ->join('acp2.participations', 'acppart2') ->select('identity(acp2.requestorPerson)') ->where($expr->eq('acp2.requestorPerson', 'acppart2.person')) + ->andWhere('acp2.id = acp.id') ->getDQL() ) );