diff --git a/CHANGELOG.md b/CHANGELOG.md index f369f792d..05030aa18 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ and this project adheres to * [person] Order social issues by the field "ordering" (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/388) +* [Person/Household list] when listing other simultaneous members of an household, exclude the members on person, not on members (avoid to show two membersship with the same person) ## Test releases diff --git a/src/Bundle/ChillPersonBundle/Entity/Household/Household.php b/src/Bundle/ChillPersonBundle/Entity/Household/Household.php index b922ad19c..2620ed19a 100644 --- a/src/Bundle/ChillPersonBundle/Entity/Household/Household.php +++ b/src/Bundle/ChillPersonBundle/Entity/Household/Household.php @@ -358,7 +358,7 @@ class Household $membership->getEndDate() )->filter( static function (HouseholdMember $m) use ($membership) { - return $m !== $membership; + return $m->getPerson() !== $membership->getPerson(); } ); }