diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/CurrentActionFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/CurrentActionFilter.php index cbf958182..cbdb64d8d 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/CurrentActionFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/CurrentActionFilter.php @@ -23,9 +23,9 @@ class CurrentActionFilter implements FilterInterface return null; } - public function alterQuery(QueryBuilder $qb, $data) + public function alterQuery(QueryBuilder $qb, $data): void { - $qb->andWhere('acpw.startDate IS NULL'); + $qb->andWhere('acpw.endDate IS NULL'); } public function applyOn(): string @@ -33,7 +33,7 @@ class CurrentActionFilter implements FilterInterface return Declarations::SOCIAL_WORK_ACTION_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { //no form } diff --git a/src/Bundle/ChillPersonBundle/config/services/exports_social_actions.yaml b/src/Bundle/ChillPersonBundle/config/services/exports_social_actions.yaml index 28401c3b3..8b2d9d2b8 100644 --- a/src/Bundle/ChillPersonBundle/config/services/exports_social_actions.yaml +++ b/src/Bundle/ChillPersonBundle/config/services/exports_social_actions.yaml @@ -38,6 +38,10 @@ services: - { name: chill.export_filter, alias: social_work_actions_treatingagent_filter } Chill\PersonBundle\Export\Filter\SocialWorkFilters\CurrentActionFilter: + autowire: true + autoconfigure: true + tags: + - { name: chill.export_filter, alias: social_work_actions_current_filter } ## AGGREGATORS chill.person.export.aggregator_action_type: @@ -89,4 +93,4 @@ services: tags: - { name: chill.export_aggregator, alias: social_work_actions_goal_result_aggregator } - Chill\PersonBundle\Export\Aggregator\SocialWorkAggregators\CurrentActionAggregator: \ No newline at end of file + Chill\PersonBundle\Export\Aggregator\SocialWorkAggregators\CurrentActionAggregator: diff --git a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml index ee5b397df..f73c4eba6 100644 --- a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml @@ -578,7 +578,7 @@ Filter by creator job: Filtrer les parcours par métier du créateur Group by creator job: Grouper les parcours par métier du créateur Filter by current actions: Filtrer les actions en cours -Filtered by current action: Filtré les actions en cours +Filtered by current action: 'Filtré: uniquement les actions en cours (sans date de fin)' Group by current actions: Grouper les actions en cours Current action: Actions en cours Not current action: Actions terminées