From b242a42da7f3679318f60744e8072d2b1c2ad2c5 Mon Sep 17 00:00:00 2001 From: sboursen-scinote Date: Tue, 28 Nov 2023 13:22:19 +0100 Subject: [PATCH] Fix activity for delete inventory item [SCI-9787] --- .../global_activities/references/_repository_row.html.erb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/views/global_activities/references/_repository_row.html.erb b/app/views/global_activities/references/_repository_row.html.erb index 7bac16098..d0e12c272 100644 --- a/app/views/global_activities/references/_repository_row.html.erb +++ b/app/views/global_activities/references/_repository_row.html.erb @@ -7,6 +7,12 @@ team, subject.repository.name&.truncate(Constants::NAME_TRUNCATION_LENGTH), title: subject.repository.name) %> + <% elsif type_of == 'delete_item_inventory' && values.dig('message_items', 'repository', 'id') %> + <% repository = Repository.find(values.dig('message_items', 'repository', 'id')) %> + <%= route_to_other_team(repository_path(repository.id, team: repository.team.id), + team, + repository.name&.truncate(Constants::NAME_TRUNCATION_LENGTH), + title: repository.name) %> <% else %> <%= breadcrumbs['repository']&.truncate(Constants::NAME_TRUNCATION_LENGTH) %>