From c244e69e81ede127ae1778a7e57fe43e1ba978fd Mon Sep 17 00:00:00 2001 From: zmagod Date: Fri, 17 Mar 2017 16:59:40 +0100 Subject: [PATCH] fixed report comments bug [fixes SCI-1100] --- app/views/reports/elements/_result_asset_element.html.erb | 2 +- app/views/reports/elements/_result_comments_element.html.erb | 2 +- app/views/reports/elements/_result_table_element.html.erb | 2 +- app/views/reports/elements/_result_text_element.html.erb | 2 +- app/views/reports/elements/_step_comments_element.html.erb | 2 +- app/views/reports/elements/_step_element.html.erb | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/views/reports/elements/_result_asset_element.html.erb b/app/views/reports/elements/_result_asset_element.html.erb index 7a93830f7..c863c0597 100644 --- a/app/views/reports/elements/_result_asset_element.html.erb +++ b/app/views/reports/elements/_result_asset_element.html.erb @@ -1,7 +1,7 @@ <% if result.blank? and @result.present? then result = @result end %> <% asset = result.asset %> <% is_image = result.asset.is_image? %> -<% comments = result.comments %> +<% comments = result.result_comments %> <% timestamp = asset.created_at %> <% name = result.name %> <% icon_class = is_image ? "glyphicon-picture" : "glyphicon-file" %> diff --git a/app/views/reports/elements/_result_comments_element.html.erb b/app/views/reports/elements/_result_comments_element.html.erb index 9d643f55c..08a6a96ed 100644 --- a/app/views/reports/elements/_result_comments_element.html.erb +++ b/app/views/reports/elements/_result_comments_element.html.erb @@ -1,6 +1,6 @@ <% if result.blank? and @result.present? then result = @result end %> <% if order.blank? and @order.present? then order = @order end %> -<% comments = result.comments.order(created_at: order) %> +<% comments = result.result_comments.order(created_at: order) %> <% timestamp = Time.current + 1.year %>
" data-type="result_comments" data-id="<%= result.id %>" data-name="<%=t "projects.reports.elements.result_comments.sidebar_name" %>" data-icon-class="glyphicon-comment">
diff --git a/app/views/reports/elements/_result_table_element.html.erb b/app/views/reports/elements/_result_table_element.html.erb index 65f564e78..7129f5eed 100644 --- a/app/views/reports/elements/_result_table_element.html.erb +++ b/app/views/reports/elements/_result_table_element.html.erb @@ -1,6 +1,6 @@ <% if result.blank? and @result.present? then result = @result end %> <% table = result.table %> -<% comments = result.comments %> +<% comments = result.result_comments %> <% timestamp = table.created_at %> <% name = result.name %>
" data-name="<%= name %>" data-icon-class="glyphicon-th"> diff --git a/app/views/reports/elements/_result_text_element.html.erb b/app/views/reports/elements/_result_text_element.html.erb index 69a4fd40f..1530aaacb 100644 --- a/app/views/reports/elements/_result_text_element.html.erb +++ b/app/views/reports/elements/_result_text_element.html.erb @@ -1,6 +1,6 @@ <% if result.blank? and @result.present? then result = @result end %> <% result_text = result.result_text %> -<% comments = result.comments %> +<% comments = result.result_comments %> <% timestamp = result.created_at %> <% name = result.name %>
" data-name="<%= name %>" data-icon-class="glyphicon-asterisk"> diff --git a/app/views/reports/elements/_step_comments_element.html.erb b/app/views/reports/elements/_step_comments_element.html.erb index 9ca7fb14e..dbb8d1a65 100644 --- a/app/views/reports/elements/_step_comments_element.html.erb +++ b/app/views/reports/elements/_step_comments_element.html.erb @@ -1,6 +1,6 @@ <% if step.blank? and @step.present? then step = @step end %> <% if order.blank? and @order.present? then order = @order end %> -<% comments = step.comments.order(created_at: order) %> +<% comments = step.step_comments.order(created_at: order) %> <% timestamp = Time.current + 1.year %>
" data-icon-class="glyphicon-comment">
diff --git a/app/views/reports/elements/_step_element.html.erb b/app/views/reports/elements/_step_element.html.erb index ced4d19f4..7a73b519e 100644 --- a/app/views/reports/elements/_step_element.html.erb +++ b/app/views/reports/elements/_step_element.html.erb @@ -3,7 +3,7 @@ <% tables = step.tables %> <% assets = step.assets %> <% checklists = step.checklists %> -<% comments = step.comments %> +<% comments = step.step_comments %>
" data-name="<%=t "projects.reports.elements.step.sidebar_name", pos: (step.position + 1), name: step.name %>" data-icon-class="glyphicon-circle-arrow-right">