[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
This commit is contained in:
Julien Fastré 2022-09-21 16:14:07 +02:00
parent 01fb93e9e0
commit ca6fde934b

View File

@ -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()
)
);