From 0cae124fc7ea3576bfc6fa44d271505bc291d8fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20G=C3=BCnther?= Date: Thu, 4 Nov 2021 09:46:16 +0100 Subject: [PATCH] Fix missing sortBy key to the export query --- app/models/exports/formatters/custom_field.rb | 2 -- app/models/exports/formatters/default.rb | 2 -- app/models/projects/exports/query_exporter.rb | 8 +++++--- app/views/projects/_project_export_modal.html.erb | 2 +- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/app/models/exports/formatters/custom_field.rb b/app/models/exports/formatters/custom_field.rb index ca9630b1a9..153892c7f3 100644 --- a/app/models/exports/formatters/custom_field.rb +++ b/app/models/exports/formatters/custom_field.rb @@ -1,8 +1,6 @@ module Exports module Formatters class CustomField < Default - ## - # Checks if this column is applicable for this column def self.apply?(attribute) attribute.start_with?('cf_') end diff --git a/app/models/exports/formatters/default.rb b/app/models/exports/formatters/default.rb index 69147968aa..64318d4957 100644 --- a/app/models/exports/formatters/default.rb +++ b/app/models/exports/formatters/default.rb @@ -9,8 +9,6 @@ module Exports @attribute = attribute end - ## - # Checks if this column is applicable for this column def self.apply?(_attribute) false end diff --git a/app/models/projects/exports/query_exporter.rb b/app/models/projects/exports/query_exporter.rb index 882bdecff3..5d08073583 100644 --- a/app/models/projects/exports/query_exporter.rb +++ b/app/models/projects/exports/query_exporter.rb @@ -43,9 +43,11 @@ module Projects::Exports def projects @projects ||= query - .results - .page(page) - .per_page(Setting.work_packages_export_limit.to_i) + .results + .with_required_storage + .with_latest_activity + .page(page) + .per_page(Setting.work_packages_export_limit.to_i) end private diff --git a/app/views/projects/_project_export_modal.html.erb b/app/views/projects/_project_export_modal.html.erb index ab0b944a0d..95db1de789 100644 --- a/app/views/projects/_project_export_modal.html.erb +++ b/app/views/projects/_project_export_modal.html.erb @@ -45,7 +45,7 @@ See COPYRIGHT and LICENSE files for more details.