diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-20 17:22:11 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-20 17:22:11 +0300 |
commit | 0c872e02b2c822e3397515ec324051ff540f0cd5 (patch) | |
tree | ce2fb6ce7030e4dad0f4118d21ab6453e5938cdd /app/services/issues/move_service.rb | |
parent | f7e05a6853b12f02911494c4b3fe53d9540d74fc (diff) |
Add latest changes from gitlab-org/gitlab@15-7-stable-eev15.7.0-rc42
Diffstat (limited to 'app/services/issues/move_service.rb')
-rw-r--r-- | app/services/issues/move_service.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/app/services/issues/move_service.rb b/app/services/issues/move_service.rb index 6366ff4076b..f7f7d85611b 100644 --- a/app/services/issues/move_service.rb +++ b/app/services/issues/move_service.rb @@ -19,6 +19,7 @@ module Issues # to receive service desk emails on the new moved issue. update_service_desk_sent_notifications + copy_email_participants queue_copy_designs new_entity @@ -49,6 +50,18 @@ module Issues .sent_notifications.update_all(project_id: new_entity.project_id, noteable_id: new_entity.id) end + def copy_email_participants + new_attributes = { id: nil, issue_id: new_entity.id } + + new_participants = original_entity.issue_email_participants.dup + + new_participants.each do |participant| + participant.assign_attributes(new_attributes) + end + + IssueEmailParticipant.bulk_insert!(new_participants) + end + override :update_old_entity def update_old_entity super |