From 5629a0c124eec341d11ae9d0eb57e36bc5440146 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Tue, 29 Oct 2024 14:32:37 +0100 Subject: [PATCH 1/3] Adjust query to also add households in the list that do not have an address --- .../Export/Export/ListHouseholdInPeriod.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Export/Export/ListHouseholdInPeriod.php b/src/Bundle/ChillPersonBundle/Export/Export/ListHouseholdInPeriod.php index 21f7a5923..b69330002 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/ListHouseholdInPeriod.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/ListHouseholdInPeriod.php @@ -219,11 +219,14 @@ class ListHouseholdInPeriod implements ListInterface, GroupedExportInterface $qb ->leftJoin('household.addresses', 'addresses') ->andWhere( - $qb->expr()->andX( - $qb->expr()->lte('addresses.validFrom', ':calcDate'), - $qb->expr()->orX( - $qb->expr()->isNull('addresses.validTo'), - $qb->expr()->gt('addresses.validTo', ':calcDate') + $qb->expr()->orX( + $qb->expr()->isNull('addresses'), // Include households without any address + $qb->expr()->andX( + $qb->expr()->lte('addresses.validFrom', ':calcDate'), + $qb->expr()->orX( + $qb->expr()->isNull('addresses.validTo'), + $qb->expr()->gt('addresses.validTo', ':calcDate') + ) ) ) ); From b503f58089983b25f774e21e5c53076636f433a9 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Tue, 29 Oct 2024 14:38:29 +0100 Subject: [PATCH 2/3] Rector fix --- src/Bundle/ChillCustomFieldsBundle/Entity/CustomFieldsGroup.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Bundle/ChillCustomFieldsBundle/Entity/CustomFieldsGroup.php b/src/Bundle/ChillCustomFieldsBundle/Entity/CustomFieldsGroup.php index 21aa746aa..723b47612 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Entity/CustomFieldsGroup.php +++ b/src/Bundle/ChillCustomFieldsBundle/Entity/CustomFieldsGroup.php @@ -178,7 +178,7 @@ class CustomFieldsGroup * * @return CustomFieldsGroup */ - public function setName($name) + public function setName(array|string $name) { $this->name = $name; From a00f47c312c494fdb1205057b52da2701b4b81a8 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Tue, 29 Oct 2024 14:38:47 +0100 Subject: [PATCH 3/3] changie added --- .changes/unreleased/Fixed-20241029-143304.yaml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .changes/unreleased/Fixed-20241029-143304.yaml diff --git a/.changes/unreleased/Fixed-20241029-143304.yaml b/.changes/unreleased/Fixed-20241029-143304.yaml new file mode 100644 index 000000000..efc0a5fb5 --- /dev/null +++ b/.changes/unreleased/Fixed-20241029-143304.yaml @@ -0,0 +1,6 @@ +kind: Fixed +body: Adjust household list export to include households even if their address is + NULL +time: 2024-10-29T14:33:04.393943822+01:00 +custom: + Issue: ""