Merge pull request #3341 from okriuchykhin/ok_SCI_5742

Use the same ordering in PDF report for full results file previews as in the main results section [SCI-5742]
This commit is contained in:
Miha Mencin 2021-05-21 09:54:21 +02:00 committed by GitHub
commit afeed9b512
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -96,7 +96,8 @@ module Reports
def append_result_asset_previews(report, report_file)
Dir.mktmpdir do |tmp_dir|
report.report_elements.my_module.each do |my_module_element|
my_module_element.my_module.results.each do |result|
results = my_module_element.my_module.results
order_results_for_report(results, report.settings.dig(:task, :result_order)).each do |result|
next unless result.is_asset && PREVIEW_EXTENSIONS.include?(result.asset.file.blob.filename.extension)
asset = result.asset