Merge branch '185-fix-inconsistencies-person-geog-unit-aggregator' into 'master'

Fix geographical unit stat aggregator by course: show also the course if they...

Closes #194 and #185

See merge request Chill-Projet/chill-bundles!607
This commit is contained in:
2023-11-07 15:15:12 +00:00
12 changed files with 255 additions and 20 deletions

View File

@@ -83,7 +83,12 @@ final readonly class GeographicalUnitStatAggregator implements AggregatorInterfa
'acp_geog_units'
);
$qb->andWhere($qb->expr()->in('acp_geog_units.layer', ':acp_geog_unit_layer'));
$qb->andWhere(
$qb->expr()->orX(
$qb->expr()->isNull('acp_geog_units'),
$qb->expr()->in('acp_geog_units.layer', ':acp_geog_unit_layer')
)
);
$qb->setParameter('acp_geog_unit_layer', $data['level']);