Add location duplication activities [SCI-11866]

This commit is contained in:
Martin Artnik 2025-04-30 11:38:19 +02:00
parent 941c430871
commit 64504fcfef
3 changed files with 10 additions and 4 deletions

View file

@ -93,7 +93,7 @@ class StorageLocationsController < ApplicationController
new_storage_location = @storage_location.duplicate!(current_user, current_team)
if new_storage_location
@storage_location = new_storage_location
log_activity('storage_location_created')
log_activity('storage_location_duplicated')
render json: @storage_location, serializer: Lists::StorageLocationSerializer
else
render json: { errors: :failed }, status: :unprocessable_entity

View file

@ -558,7 +558,9 @@ class Extends
form_duplicated: 357,
form_unpublished: 358,
task_steps_loaded_from_template: 359,
protocol_steps_loaded_from_template: 360
protocol_steps_loaded_from_template: 360,
storage_location_duplicated: 361,
container_storage_location_duplicated: 362
}
ACTIVITY_GROUPS = {
@ -579,8 +581,8 @@ class Extends
*237..240, *253..256, *279..283, 300, 304, 307, 330, *353..355, 360],
team: [92, 94, 93, 97, 104, 244, 245],
label_templates: [*216..219],
storage_locations: [*309..315],
container_storage_locations: [*316..322, 326],
storage_locations: [*309..315, 361],
container_storage_locations: [*316..322, 326, 362],
storage_location_repository_rows: [*323..325],
forms: [331, 332, 333, 334, 335, 336, *337..346, 356, 357, 358]
}

View file

@ -329,6 +329,7 @@ en:
storage_location_shared_html: "%{user} shared location %{storage_location} with team %{team} with %{permission_level} permission."
storage_location_unshared_html: "%{user} unshared location %{storage_location} with team %{team}."
storage_location_sharing_updated_html: "%{user} changed permission of shared location %{storage_location} with team %{team} to %{permission_level}."
storage_location_duplicated_html: "%{user} duplicated location %{storage_location}."
container_storage_location_created_html: "%{user} created box %{storage_location}."
container_storage_location_deleted_html: "%{user} deleted box %{storage_location}."
container_storage_location_edited_html: "%{user} edited box %{storage_location}."
@ -336,6 +337,7 @@ en:
container_storage_location_shared_html: "%{user} shared box %{storage_location} with team %{team} with %{permission_level} permission."
container_storage_location_unshared_html: "%{user} unshared box %{storage_location} with team %{team}."
container_storage_location_sharing_updated_html: "%{user} changed permission of shared box %{storage_location} with team %{team} to %{permission_level}."
container_storage_location_duplicated_html: "%{user} duplicated box %{storage_location}."
storage_location_repository_row_created_html: "%{user} assigned %{repository_row} to box %{storage_location} %{position}."
storage_location_repository_row_deleted_html: "%{user} unassigned %{repository_row} from box %{storage_location} %{position}."
storage_location_repository_row_moved_html: "%{user} moved item %{repository_row} from box %{storage_location_original} %{position_original} to box %{storage_location} %{position}."
@ -659,6 +661,7 @@ en:
storage_location_moved: "Location moved"
storage_location_shared: "Location shared"
storage_location_unshared: "Location unshared"
storage_location_duplicated: "Location duplicated"
storage_location_sharing_updated: "Location sharing permission updated"
container_storage_location_created: "Box created"
container_storage_location_deleted: "Box deleted"
@ -667,6 +670,7 @@ en:
container_storage_location_shared: "Box shared"
container_storage_location_unshared: "Box unshared"
container_storage_location_sharing_updated: "Box sharing permission updated"
container_storage_location_duplicated: "Box duplicated"
storage_location_repository_row_created: "Inventory item location assigned"
storage_location_repository_row_deleted: "Inventory item location unassigned"
storage_location_repository_row_moved: "Inventory item location moved"