Merge pull request #6726 from sboursen-scinote/sb_SCI-9787

Fix activity for delete inventory item [SCI-9787]
This commit is contained in:
Martin Artnik 2023-11-28 14:01:41 +01:00 committed by GitHub
commit 843cff8e1a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 %>
<span title="<%= breadcrumbs['repository'] %>">
<%= breadcrumbs['repository']&.truncate(Constants::NAME_TRUNCATION_LENGTH) %>