diff --git a/.changes/unreleased/Fixed-20240111-115909.yaml b/.changes/unreleased/Fixed-20240111-115909.yaml new file mode 100644 index 000000000..b5e78c73b --- /dev/null +++ b/.changes/unreleased/Fixed-20240111-115909.yaml @@ -0,0 +1,6 @@ +kind: Fixed +body: Fix the id_seq used when creating a new accompanying period participation during + fusion of two person files +time: 2024-01-11T11:59:09.581242964+01:00 +custom: + Issue: "" diff --git a/src/Bundle/ChillPersonBundle/Actions/Remove/Handler/PersonMoveAccompanyingPeriodParticipationHandler.php b/src/Bundle/ChillPersonBundle/Actions/Remove/Handler/PersonMoveAccompanyingPeriodParticipationHandler.php index 2c342a9a5..3cff98292 100644 --- a/src/Bundle/ChillPersonBundle/Actions/Remove/Handler/PersonMoveAccompanyingPeriodParticipationHandler.php +++ b/src/Bundle/ChillPersonBundle/Actions/Remove/Handler/PersonMoveAccompanyingPeriodParticipationHandler.php @@ -26,7 +26,7 @@ class PersonMoveAccompanyingPeriodParticipationHandler implements PersonMoveSqlH { $insertSql = sprintf(<<<'SQL' INSERT INTO chill_person_accompanying_period_participation (person_id, accompanyingperiod_id, id, startdate, enddate) - SELECT %d, accompanyingperiod_id, nextval('chill_person_accompanying_period_id_seq'), startdate, enddate + SELECT %d, accompanyingperiod_id, nextval('chill_person_accompanying_period_participation_id_seq'), startdate, enddate FROM chill_person_accompanying_period_participation cpapp WHERE person_id = %d AND NOT EXISTS (