Fix geographical unit stat aggregator by course: show also the course if they are not located within a location

This commit is contained in:
Julien Fastré 2023-11-07 14:41:56 +01:00
parent 4d20a46717
commit abebb79e8b
Signed by: julienfastre
GPG Key ID: BDE2190974723FCB
2 changed files with 12 additions and 1 deletions

View File

@ -0,0 +1,6 @@
kind: Fixed
body: 'Export: fix "group accompanying period by geographical unit": take into account
the accompanying periods when the period is not located within an unit'
time: 2023-11-07T14:40:39.46483404+01:00
custom:
Issue: "185"

View File

@ -83,7 +83,12 @@ final readonly class GeographicalUnitStatAggregator implements AggregatorInterfa
'acp_geog_units' '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']); $qb->setParameter('acp_geog_unit_layer', $data['level']);