Fix missing sortBy key to the export query

pull/9782/head
Oliver Günther 3 years ago
parent 33acdd765a
commit 0cae124fc7
No known key found for this signature in database
GPG Key ID: A3A8BDAD7C0C552C
  1. 2
      app/models/exports/formatters/custom_field.rb
  2. 2
      app/models/exports/formatters/default.rb
  3. 8
      app/models/projects/exports/query_exporter.rb
  4. 2
      app/views/projects/_project_export_modal.html.erb

@ -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

@ -9,8 +9,6 @@ module Exports
@attribute = attribute
end
##
# Checks if this column is applicable for this column
def self.apply?(_attribute)
false
end

@ -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

@ -45,7 +45,7 @@ See COPYRIGHT and LICENSE files for more details.
<ul class="op-export-options">
<% supported_export_formats.each do |key| %>
<li class="op-export-options--option">
<% filter_params = safe_query_params ['filters'] %>
<% filter_params = safe_query_params ['filters', 'sortBy'] %>
<%= link_to url_for(action: 'index', format: key, **filter_params),
class: 'op-export-options--option-link' do %>
<%= op_icon("icon-big icon-export-#{key}") %>

Loading…
Cancel
Save