Merge pull request #6805 from artoscinote/ma_SCI_9863

Fix project assignment activity & notification recipients [SCI-9863]
This commit is contained in:
Martin Artnik 2023-12-12 12:42:39 +01:00 committed by GitHub
commit 9ddec2144e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 4 deletions

View file

@ -35,10 +35,8 @@ module AccessPermissions
@user_assignment.update!(permitted_update_params)
unless current_user.id == @user_assignment.user.id
log_activity(:change_user_role_on_project, { user_target: @user_assignment.user.id,
role: @user_assignment.user_role.name })
end
log_activity(:change_user_role_on_project, { user_target: @user_assignment.user.id,
role: @user_assignment.user_role.name })
propagate_job(@user_assignment)
render :project_member

View file

@ -8,5 +8,6 @@ class Recipients::AssignedRecipients
def recipients
activity = Activity.find(@params[:activity_id])
User.where(id: activity.values.dig('message_items', 'user_target', 'id'))
.where.not(id: activity.owner_id)
end
end