Feature: [export] allow to check multiple geographical layers in

geographical aggregators

BC: saved exports which activated this layers won't work any more. This
is the query to find them:

```sql
SELECT * FROM chill_main_saved_export
WHERE
    options->'export'->'export'->'aggregators'->'accompanyingcourse_geographicalunitstat_aggregator'->>'enabled' = '1'
```
This commit is contained in:
Julien Fastré 2023-04-25 17:37:27 +02:00
parent 00e62442cc
commit cdaca533a0
Signed by: julienfastre
GPG Key ID: BDE2190974723FCB
2 changed files with 5 additions and 1 deletions

View File

@ -98,7 +98,7 @@ final class GeographicalUnitStatAggregator implements AggregatorInterface
'acp_geog_units'
);
$qb->andWhere($qb->expr()->eq('acp_geog_units.layer', ':acp_geog_unit_layer'));
$qb->andWhere($qb->expr()->in('acp_geog_units.layer', ':acp_geog_unit_layer'));
$qb->setParameter('acp_geog_unit_layer', $data['level']);
@ -131,6 +131,8 @@ final class GeographicalUnitStatAggregator implements AggregatorInterface
'choice_label' => function (GeographicalUnitLayer $item) {
return $this->translatableStringHelper->localize($item->getName());
},
'multiple' => true,
'expanded' => true,
]);
}

View File

@ -103,6 +103,8 @@ class GeographicalUnitAggregator implements AggregatorInterface
'choice_label' => function (GeographicalUnitLayer $item) {
return $this->translatableStringHelper->localize($item->getName());
},
'multiple' => true,
'expanded' => true,
]);
}