Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/services/issues/move_service.rb')
-rw-r--r--app/services/issues/move_service.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/app/services/issues/move_service.rb b/app/services/issues/move_service.rb
index 2409396c1ac..ce1466307e1 100644
--- a/app/services/issues/move_service.rb
+++ b/app/services/issues/move_service.rb
@@ -19,11 +19,22 @@ module Issues
notify_participants
+ # Updates old issue sent notifications allowing
+ # to receive service desk emails on the new moved issue.
+ update_service_desk_sent_notifications
+
new_entity
end
private
+ def update_service_desk_sent_notifications
+ return unless original_entity.from_service_desk?
+
+ original_entity
+ .sent_notifications.update_all(project_id: new_entity.project_id, noteable_id: new_entity.id)
+ end
+
def update_old_entity
super