diff --git a/app/services/report_actions/save_pdf_to_inventory_item.rb b/app/services/report_actions/save_pdf_to_inventory_item.rb index c27ddf2bc..6d7d0bd81 100644 --- a/app/services/report_actions/save_pdf_to_inventory_item.rb +++ b/app/services/report_actions/save_pdf_to_inventory_item.rb @@ -17,6 +17,7 @@ module ReportActions cell.destroy if cell @new_cell_value = create_new_cell_value(asset) @new_cell_value.save + log_activity end def error_messages @@ -107,6 +108,18 @@ module ReportActions return content unless content.blank? I18n.t('projects.reports.new.no_content_for_PDF_html') end + + def log_activity + Activities::CreateActivityService + .call(activity_type: :edit_item_inventory, + owner: @user, + subject: @repository, + team: @team, + message_items: { + repository_row: @repository_item.id, + repository: @repository.id + }) + end end RepositoryPermissionError = Class.new(StandardError)