From db3de835f858e7e9ef4ff390d56f1f78055f1015 Mon Sep 17 00:00:00 2001 From: Oleksii Kriuchykhin Date: Tue, 15 Sep 2020 11:58:35 +0200 Subject: [PATCH] Change subject to task for activities for exporting assigned items (live & snapshots) [SCI-4881] --- app/controllers/my_module_repositories_controller.rb | 2 +- app/controllers/my_module_repository_snapshots_controller.rb | 2 +- config/initializers/extends.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/my_module_repositories_controller.rb b/app/controllers/my_module_repositories_controller.rb index 7ecc50060..eccb3d7a9 100644 --- a/app/controllers/my_module_repositories_controller.rb +++ b/app/controllers/my_module_repositories_controller.rb @@ -123,7 +123,7 @@ class MyModuleRepositoriesController < ApplicationController Activities::CreateActivityService.call( activity_type: :export_inventory_items_assigned_to_task, owner: current_user, - subject: @repository, + subject: @my_module, team: current_team, message_items: { my_module: @my_module.id, diff --git a/app/controllers/my_module_repository_snapshots_controller.rb b/app/controllers/my_module_repository_snapshots_controller.rb index 379ed0155..3c1d52685 100644 --- a/app/controllers/my_module_repository_snapshots_controller.rb +++ b/app/controllers/my_module_repository_snapshots_controller.rb @@ -108,7 +108,7 @@ class MyModuleRepositorySnapshotsController < ApplicationController Activities::CreateActivityService.call( activity_type: :export_inventory_snapshot_items_assigned_to_task, owner: current_user, - subject: @repository_snapshot, + subject: @my_module, team: current_team, message_items: { my_module: @my_module.id, diff --git a/config/initializers/extends.rb b/config/initializers/extends.rb index 0caf096d8..6624f1fbe 100644 --- a/config/initializers/extends.rb +++ b/config/initializers/extends.rb @@ -296,7 +296,7 @@ class Extends task_results: [23, 26, 25, 42, 24, 40, 41, 99, 110, 122, 116, 128], task: [8, 58, 9, 59, *10..14, 35, 36, 37, 53, 54, *60..63, 138, 139, 140, 64, *66..69, 106, 126, 120, 132], task_protocol: [15, 22, 16, 18, 19, 20, 21, 17, 38, 39, 100, 111, 45, 46, 47, 121, 124, 115, 118, 127, 130, 137], - task_inventory: [55, 56], + task_inventory: [55, 56, 146, 147], experiment: [*27..31, 57], reports: [48, 50, 49], inventories: [70, 71, 105, 144, 145, 72, 73, 74, 102, 142, 143, 75, 76, 77, 78, 96, 107, 113, 114, *133..136],