Merge pull request #3409 from artoscinote/ma_SCI_5851

Report generation fixes [SCI-5851]
This commit is contained in:
artoscinote 2021-06-29 14:55:26 +02:00 committed by GitHub
commit 73c86c8423
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View file

@ -4,7 +4,7 @@ module Reports::Docx::DrawStep
def draw_step(step)
color = @color
step_type_str = step.completed ? 'completed' : 'uncompleted'
user = step.completed? ? step.last_modified_by : step.user
user = step.completed? && step.last_modified_by || step.user
timestamp = step.completed ? step.completed_on : step.created_at
@docx.p
@docx.h5 (I18n.t('projects.reports.elements.step.step_pos', pos: step.position_plus_one) +

View file

@ -143,7 +143,7 @@ module Reports
asset_preview = Reports::Utils.image_prepare(asset)
dimension = FastImage.size(asset_preview.service_url)
dimension = FastImage.size(asset_preview.processed.service_url)
return unless dimension
x = dimension[0]

View file

@ -1,6 +1,6 @@
<% step ||= report_element.step %>
<% step_type_str = step.completed ? 'completed' : 'uncompleted' %>
<% user = step.completed? ? step.last_modified_by : step.user %>
<% user = step.completed? && step.last_modified_by || step.user %>
<% timestamp = step.completed ? step.completed_on : step.created_at %>
<% tables = step.tables %>
<% assets = step.assets %>