Also send task unassign notification to the person that was unassigned [SCI-5607]

This commit is contained in:
Martin Artnik 2021-07-13 12:11:49 +02:00
parent d78e4713c8
commit 1985b7a7e0

View file

@ -38,6 +38,11 @@ module GenerateNotificationModel
users = subject.project.users
when MyModule
users = subject.users
# Also send to the user that was unassigned,
# and is therefore no longer present on the module.
if type_of == 'unassign_user_from_module'
users += User.where(id: values.dig('message_items', 'user_target', 'id'))
end
when Protocol
users = subject.in_repository? ? [] : subject.my_module.users
when Result