mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-11-09 16:01:30 +08:00
Also send task unassign notification to the person that was unassigned [SCI-5607]
This commit is contained in:
parent
d78e4713c8
commit
1985b7a7e0
1 changed files with 5 additions and 0 deletions
|
|
@ -38,6 +38,11 @@ module GenerateNotificationModel
|
||||||
users = subject.project.users
|
users = subject.project.users
|
||||||
when MyModule
|
when MyModule
|
||||||
users = subject.users
|
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
|
when Protocol
|
||||||
users = subject.in_repository? ? [] : subject.my_module.users
|
users = subject.in_repository? ? [] : subject.my_module.users
|
||||||
when Result
|
when Result
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue