From fcf2ae364f54969ed7cc04ff35079da033e1a38d Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Fri, 21 Jan 2022 16:47:02 +0100 Subject: [PATCH 1/3] all comments are kept when after a second is flagged --- src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php index 06e4f0c8b..ac39f2461 100644 --- a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php +++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php @@ -1099,6 +1099,10 @@ class AccompanyingPeriod implements } if ($comment instanceof Comment) { + + if (null !== $this->pinnedComment) { + $this->addComment($this->pinnedComment); + } $this->addComment($comment); } From 2b9f0e51777ac85831f7054bde495810a8c5de46 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Fri, 21 Jan 2022 16:50:09 +0100 Subject: [PATCH 2/3] changelog updated --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8ad04a636..54447b427 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ and this project adheres to * [main] location form type: fix unmapped address field (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/246) * [activity] fix wrong import of js assets for adding and viewing documents in activity (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/83 & https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/176) * [person]: space added between deathdate and age in twig renderbox (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/380) +* [parcours]: bug fix when comment is pinned all other comments remain in the collection (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/385) ### test release 2022-01-17 From 45f3bb00d6ffb4b462446fedb7ba0dce8a31238e Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Fri, 21 Jan 2022 16:50:24 +0100 Subject: [PATCH 3/3] php csfixes --- src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php | 1 - src/Bundle/ChillPersonBundle/Form/CreationPersonType.php | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php index ac39f2461..752328511 100644 --- a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php +++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php @@ -1099,7 +1099,6 @@ class AccompanyingPeriod implements } if ($comment instanceof Comment) { - if (null !== $this->pinnedComment) { $this->addComment($this->pinnedComment); } diff --git a/src/Bundle/ChillPersonBundle/Form/CreationPersonType.php b/src/Bundle/ChillPersonBundle/Form/CreationPersonType.php index 82437eb30..a33858c02 100644 --- a/src/Bundle/ChillPersonBundle/Form/CreationPersonType.php +++ b/src/Bundle/ChillPersonBundle/Form/CreationPersonType.php @@ -61,13 +61,13 @@ final class CreationPersonType extends AbstractType 'required' => false, ]) ->add('phonenumber', TelType::class, [ - 'required' => false + 'required' => false, ]) ->add('mobilenumber', TelType::class, [ - 'required' => false + 'required' => false, ]) ->add('email', EmailType::class, [ - 'required' => false + 'required' => false, ]); if ($this->askCenters) {