From a1047f4597f0b79d20da6aa9a86853c1824f84d0 Mon Sep 17 00:00:00 2001 From: aignatov-bio <47317017+aignatov-bio@users.noreply.github.com> Date: Thu, 4 Apr 2019 10:45:35 +0200 Subject: [PATCH] Fix activities wording [SCI-3287] (#1635) * Fix activities wording * Adding project to export protocol --- app/controllers/protocols_controller.rb | 4 +++- config/locales/global_activities/en.yml | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/controllers/protocols_controller.rb b/app/controllers/protocols_controller.rb index d392a3de8..5cc222f69 100644 --- a/app/controllers/protocols_controller.rb +++ b/app/controllers/protocols_controller.rb @@ -804,10 +804,12 @@ class ProtocolsController < ApplicationController @protocols.each do |p| if params[:my_module_id] + my_module = MyModule.find(params[:my_module_id]) Activities::CreateActivityService .call(activity_type: :export_protocol_from_task, owner: current_user, - subject: MyModule.find(params[:my_module_id]), + project: my_module.experiment.project, + subject: my_module, team: current_team, message_items: { my_module: params[:my_module_id].to_i diff --git a/config/locales/global_activities/en.yml b/config/locales/global_activities/en.yml index 447ae7a44..d35059e96 100644 --- a/config/locales/global_activities/en.yml +++ b/config/locales/global_activities/en.yml @@ -38,7 +38,7 @@ en: create_project_html: "%{user} created project %{project}." rename_project_html: "%{user} renamed project %{project}." change_project_visibility_html: "%{user} changed project %{project}'s visibility to %{visibility}." - archive_project_html: "%{user} moved project %{project} to archive." + archive_project_html: "%{user} archived project %{project}." restore_project_html: "%{user} restored project %{project} from archive." add_comment_to_project_html: "%{user} commented on project %{project}." edit_project_comment_html: "%{user} edited comment on project %{project}." @@ -191,7 +191,7 @@ en: restore_experiment: "Experiment restored" rename_task: "Task renamed" move_task: "Task moved" - export_protocol_from_task: "Export protocol form task" + export_protocol_from_task: "Export protocol from task" set_task_due_date: "Task due date set" change_task_due_date: "Task due date changed" remove_task_due_date: "Task due date removed"