From e6671cf0156f72f3651621a1584dea32102c175f Mon Sep 17 00:00:00 2001 From: Oleksii Kriuchykhin Date: Mon, 18 Jun 2018 15:24:02 +0200 Subject: [PATCH] Add report elements to samples migration [SCI-2505] --- lib/tasks/samples_to_repository_migration.rake | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/tasks/samples_to_repository_migration.rake b/lib/tasks/samples_to_repository_migration.rake index cbd663363..64575ce10 100644 --- a/lib/tasks/samples_to_repository_migration.rake +++ b/lib/tasks/samples_to_repository_migration.rake @@ -105,6 +105,13 @@ namespace :samples_to_repository_migration do end end + # Update report elements + team.reports.each do |r| + r.report_elements.where(type_of: 7).each do |e| + e.update_attributes(type_of: 17, repository_id: repository.id) + end + end + # Now update smart annotations migration_service.update_smart_annotations(team, sample_mappings) end