diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/SentReceivedAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/SentReceivedAggregator.php index bf848d5e1..b5300834c 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/SentReceivedAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/SentReceivedAggregator.php @@ -25,8 +25,8 @@ class SentReceivedAggregator implements AggregatorInterface public function alterQuery(QueryBuilder $qb, $data) { - $qb->addSelect('AS activity_sent_received_aggregator') - ->addGroupBy('activity_sent_received_aggregator'); + $qb->addSelect('activity.sentReceived AS activity_sentreceived_aggregator') + ->addGroupBy('activity_sentreceived_aggregator'); } public function applyOn(): string @@ -45,12 +45,22 @@ class SentReceivedAggregator implements AggregatorInterface if ('_header' === $value) { return ''; } + switch ($value) { + case 'sent': + return 'is sent'; + + case 'received': + return 'is received'; + + default: + throw new \LogicException(sprintf('The value %s is not valid', $value)); + } }; } public function getQueryKeys($data): array { - return ['activity_sent_received_aggregator']; + return ['activity_sentreceived_aggregator']; } public function getTitle(): string diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/CurrentActionAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/CurrentActionAggregator.php index 219aaf9cd..d9120d121 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/CurrentActionAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/CurrentActionAggregator.php @@ -59,7 +59,6 @@ class CurrentActionAggregator implements AggregatorInterface default: throw new \LogicException(sprintf('The value %s is not valid', $value)); } - }; }