diff --git a/CHANGELOG.md b/CHANGELOG.md index 88a7e4351..1da0df3a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,3 +4,9 @@ Version 1.5.1 - [report activity count] fix error: do not show centers which are not selected in results. +Master branch +============= + +- [aggregate by activity type] fix translation in aggregate activity type +- fix some translation in export +- fix error when persons not loaded by other aggregators / filters diff --git a/Export/Aggregator/ActivityTypeAggregator.php b/Export/Aggregator/ActivityTypeAggregator.php index 544ae98ac..3dec544ba 100644 --- a/Export/Aggregator/ActivityTypeAggregator.php +++ b/Export/Aggregator/ActivityTypeAggregator.php @@ -63,32 +63,6 @@ class ActivityTypeAggregator implements AggregatorInterface // add select element $qb->addSelect(sprintf('IDENTITY(activity.type) AS %s', self::KEY)); - // make a jointure only if needed - /*$join = $qb->getDQLPart('join'); - if ( - (array_key_exists('activity', $join) - && - !$this->checkJoinAlreadyDefined($join['activity'], 'reasons') - ) - OR - (! array_key_exists('activity', $join)) - ) { - $qb->add( - 'join', - array('activity' => - new Join(Join::INNER_JOIN, 'activity.reasons', 'reasons') - ), - true); - } - - // join category if necessary - if ($alias === 'activity_categories_id') { - // add join only if needed - if (!$this->checkJoinAlreadyDefined($qb->getDQLPart('join')['activity'], 'category')) { - $qb->join('reasons.category', 'category'); - } - }*/ - // add the "group by" part $groupBy = $qb->addGroupBy(self::KEY); } diff --git a/Export/Export/CountActivity.php b/Export/Export/CountActivity.php index 00f741fce..97a837520 100644 --- a/Export/Export/CountActivity.php +++ b/Export/Export/CountActivity.php @@ -75,9 +75,7 @@ class CountActivity implements ExportInterface ->from('ChillActivityBundle:Activity', 'activity') ; - if (in_array('person', $requiredModifiers)) { - $qb->join('activity.person', 'person'); - } + $qb->join('activity.person', 'person'); $qb->where($qb->expr()->in('person.center', ':centers')) ->setParameter('centers', $centers) diff --git a/Resources/translations/messages.fr.yml b/Resources/translations/messages.fr.yml index 63620fb49..55e367d32 100644 --- a/Resources/translations/messages.fr.yml +++ b/Resources/translations/messages.fr.yml @@ -114,6 +114,7 @@ Count activities by various parameters.: Compte le nombre d'activités enregistr Sum activity duration: Total de la durée des activités Sum activities duration by various parameters.: Additionne la durée des activités en fonction de différents paramètres. List activities: Liste les activités +Number of activities: Nombre d'activités #filters Filter by reason: Filtrer par sujet d'activité @@ -137,5 +138,7 @@ Aggregate by activity reason: Aggréger par sujet de l'activité By reason: Par sujet By category of reason: Par catégorie de sujet Reason's level: Niveau du sujet -Aggregate by activity type: Aggréger par date d'activité +Aggregate by activity type: Aggréger par type d'activité +Activity type: Type d'activité +Group by reasons: Sujet d'activité