OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
openproject/app/workers/work_packages/export_job.rb

27 lines
610 B

require 'active_storage/filename'
module WorkPackages
class ExportJob < ::Exports::ExportJob
self.model = WorkPackage
def title
I18n.t('export.your_work_packages_export')
end
private
def prepare!
self.query = set_query_props(query || Query.new, options[:query_attributes])
end
def set_query_props(query, query_attributes)
filters = query_attributes.delete('filters')
filters = Queries::WorkPackages::FilterSerializer.load(filters)
query.tap do |q|
q.attributes = query_attributes
q.filters = filters
end
end
end
end