Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

fix migration by not using class code

Markus Kahlf312adbc1bf5
diff --git a/modules/overviews/db/migrate/20190826083604_my_project_page_to_grid.rb b/modules/overviews/db/migrate/20190826083604_my_project_page_to_grid.rb
index 350da815b9f..7d41d9ddb5d 100644
--- a/modules/overviews/db/migrate/20190826083604_my_project_page_to_grid.rb
+++ b/modules/overviews/db/migrate/20190826083604_my_project_page_to_grid.rb
@@ -192,8 +192,16 @@ class MyProjectPageToGrid < ActiveRecord::Migration[5.2]
Attachment.where(container_type: 'MyProjectsOverview', container_id: id)
end
+ def new_default_query(attributes = nil)
+ Query.new(attributes).tap do |query|
+ query.add_default_filter
+ query.set_default_sort
+ query.show_hierarchies = true
+ end
+ end
+
def query(grid, identifier)
- query = Query.new_default name: '_',
+ query = new_default_query name: '_',
is_public: true,
hidden: true,
project: grid.project,