diff --git a/CHANGELOG.md b/CHANGELOG.md index 48e2ad7dd..fb22b269a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ and this project adheres to ## Unreleased +* [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(); } ); }