From 5d16a1c4456a083d214aca9c2fe3b9c97d851b90 Mon Sep 17 00:00:00 2001 From: Andrej Date: Thu, 13 Feb 2025 14:50:22 +0100 Subject: [PATCH 1/4] Fix notification destroy in user data deletion [SCI-11549] --- app/services/user_data_deletion.rb | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/app/services/user_data_deletion.rb b/app/services/user_data_deletion.rb index fef2dc995..f4270a45a 100644 --- a/app/services/user_data_deletion.rb +++ b/app/services/user_data_deletion.rb @@ -112,20 +112,6 @@ class UserDataDeletion end def self.destroy_notifications(user) - # Find all notifications where user is the only reference - # on the notification, and destroy all such notifications - # (user_notifications are destroyed when notification is - # destroyed). We try to do this efficiently (hence in_groups_of). - nids_all = user.notifications.pluck(:id) - nids_all.in_groups_of(1000, false) do |nids| - Notification - .where(id: nids) - .joins(:user_notifications) - .group('notifications.id') - .having('count(notification_id) <= 1') - .destroy_all - end - # Now, simply destroy all user notification relations left - user.user_notifications.destroy_all + user.notifications.in_batches(of: 1000).destroy_all end end From 6438b050fcc305a06c289f07f3dc7919371f4294 Mon Sep 17 00:00:00 2001 From: Martin Artnik Date: Fri, 14 Feb 2025 13:55:27 +0100 Subject: [PATCH 2/4] Include global constants in print protocol layout [SCI-11583] --- app/views/layouts/protocols/print.html.erb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/views/layouts/protocols/print.html.erb b/app/views/layouts/protocols/print.html.erb index e3a74b6c8..fe823208a 100644 --- a/app/views/layouts/protocols/print.html.erb +++ b/app/views/layouts/protocols/print.html.erb @@ -3,6 +3,8 @@ <%= t("protocols.print.title") %> + + <%= javascript_include_tag 'jquery_bundle' %> <%= javascript_include_tag 'application' %> <%= javascript_include_tag "handsontable.full" %> From e82e2e95e948beb3f9396a0a0aa0cf5d6c886b28 Mon Sep 17 00:00:00 2001 From: Andrej Date: Thu, 21 Nov 2024 17:06:41 +0100 Subject: [PATCH 3/4] Fix reloading of protocol table after protocol publish [SCI-11304] --- app/services/lists/base_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/lists/base_service.rb b/app/services/lists/base_service.rb index c3b844f90..2ac6ceb2a 100644 --- a/app/services/lists/base_service.rb +++ b/app/services/lists/base_service.rb @@ -29,7 +29,7 @@ module Lists end def paginate_records - @records = @records.page(@params[:page]).per(@params[:per_page]) if @params[:page].present? + @records = @records.page(@params[:page]).per(@params[:per_page]) end def sort_direction(order_params) From a28e024cb3176c38d899fa31f488ac315276d659 Mon Sep 17 00:00:00 2001 From: Martin Artnik <85488244+artoscinote@users.noreply.github.com> Date: Tue, 18 Feb 2025 13:06:28 +0100 Subject: [PATCH 4/4] Bump version to 1.39.1.2 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index f1e40e814..f50159248 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.39.1.1 +1.39.1.2