From 4cc953663f5a99ac9235d16a63d0a90cdab5d482 Mon Sep 17 00:00:00 2001 From: Giga Chubinidze Date: Fri, 10 Mar 2023 00:08:07 +0400 Subject: [PATCH] Display the ID of the parent protocol in reports [SCI-8081] --- app/services/reports/docx/draw_my_module_protocol.rb | 2 +- app/views/reports/elements/_my_module_protocol_element.html.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/services/reports/docx/draw_my_module_protocol.rb b/app/services/reports/docx/draw_my_module_protocol.rb index f712817c9..2096569ff 100644 --- a/app/services/reports/docx/draw_my_module_protocol.rb +++ b/app/services/reports/docx/draw_my_module_protocol.rb @@ -12,7 +12,7 @@ module Reports::Docx::DrawMyModuleProtocol end if @settings.dig('task', 'protocol', 'description') && protocol.description.present? - @docx.p I18n.t('projects.reports.elements.module.protocol.user_time', code: protocol.code, + @docx.p I18n.t('projects.reports.elements.module.protocol.user_time', code: protocol.original_code, timestamp: I18n.l(protocol.created_at, format: :full)), color: @color[:gray] html = custom_auto_link(protocol.description, team: @report_team) Reports::HtmlToWordConverter.new(@docx, { scinote_url: @scinote_url, diff --git a/app/views/reports/elements/_my_module_protocol_element.html.erb b/app/views/reports/elements/_my_module_protocol_element.html.erb index 2a8b91f9a..3bdfc8497 100644 --- a/app/views/reports/elements/_my_module_protocol_element.html.erb +++ b/app/views/reports/elements/_my_module_protocol_element.html.erb @@ -10,7 +10,7 @@ <% end %>
- <%= t('projects.reports.elements.module.protocol.user_time', code: protocol.code, timestamp: l(protocol.created_at, format: :full)) %> + <%= t('projects.reports.elements.module.protocol.user_time', code: protocol.original_code, timestamp: l(protocol.created_at, format: :full)) %>
<% if @settings.dig('task', 'protocol', 'description') && protocol.description.present? %>