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

simpler option handling

ulferts1410601e135f
diff --git a/app/seeders/demo_data/query_builder.rb b/app/seeders/demo_data/query_builder.rb
index 1e6f95b80b7..09f0261874c 100644
--- a/app/seeders/demo_data/query_builder.rb
+++ b/app/seeders/demo_data/query_builder.rb
@@ -50,11 +50,11 @@ module DemoData
def base_attributes
{
name: config[:name],
- user: User.admin.first,
- public: config[:public] != false,
+ user: User.admin.user.first,
+ public: config.fetch(:public, true),
starred: config.fetch(:starred, false),
- show_hierarchies: config[:hierarchy] == true,
- timeline_visible: config[:timeline] == true
+ show_hierarchies: config.fetch(:hierarchy, false),
+ timeline_visible: config.fetch(:timeline, false)
}
end