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

Move seeded project plan to gantt module

Oliver Günther0018c9a7787d
diff --git a/app/seeders/standard.yml b/app/seeders/standard.yml
index ff624a687ba..69f2d18884a 100644
--- a/app/seeders/standard.yml
+++ b/app/seeders/standard.yml
@@ -305,6 +305,7 @@ projects:
sort_by: id
hierarchy: true
starred: true
+ module: gantt
columns:
- id
- type
@@ -663,6 +664,7 @@ projects:
- Category 1 (to be changed in Project settings)
queries:
- t_name: Project plan
+ module: gantt
reference: :scrum_project__query__project_plan
status: open
sort_by: id
diff --git a/config/constants/settings/definition.rb b/config/constants/settings/definition.rb
index 479ed4fa1e4..2af6bc3b15f 100644
--- a/config/constants/settings/definition.rb
+++ b/config/constants/settings/definition.rb
@@ -332,6 +332,9 @@ module Settings
demo_view_of_type_team_planner_seeded: {
default: false
},
+ demo_view_of_type_gantt_seeded: {
+ default: false
+ },
development_highlight_enabled: {
description: "Enable highlighting of development environment",
default: -> { Rails.env.development? },
diff --git a/modules/bim/app/seeders/bim.yml b/modules/bim/app/seeders/bim.yml
index b089a0b312e..06bb1ee33b8 100644
--- a/modules/bim/app/seeders/bim.yml
+++ b/modules/bim/app/seeders/bim.yml
@@ -261,6 +261,7 @@ projects:
- Category 1 (to be changed in Project settings)
queries:
- t_name: Project plan
+ module: gantt
status: open
timeline: true
sort_by: start_date
@@ -408,6 +409,7 @@ projects:
- Category 1 (to be changed in Project settings)
queries:
- t_name: Project plan
+ module: gantt
status: open
timeline: true
sort_by: start_date
@@ -875,6 +877,7 @@ projects:
- Category 1 (to be changed in Project settings)
queries:
- t_name: Project plan
+ module: gantt
status: open
timeline: true
sort_by: start_date
@@ -1481,6 +1484,7 @@ projects:
type: :default_type_remark
display_representation: card
- t_name: Project plan
+ module: gantt
status: open
timeline: true
sort_by: start_date
diff --git a/spec/seeders/root_seeder_standard_edition_spec.rb b/spec/seeders/root_seeder_standard_edition_spec.rb
index bb5d5101e65..f74115b8af2 100644
--- a/spec/seeders/root_seeder_standard_edition_spec.rb
+++ b/spec/seeders/root_seeder_standard_edition_spec.rb
@@ -51,8 +51,9 @@ RSpec.describe RootSeeder,
expect(WorkPackage.count).to eq 36
expect(Wiki.count).to eq 2
expect(Query.having_views.count).to eq 8
- expect(View.where(type: "work_packages_table").count).to eq 7
+ expect(View.where(type: "work_packages_table").count).to eq 5
expect(View.where(type: "team_planner").count).to eq 1
+ expect(View.where(type: "gantt").count).to eq 2
expect(Query.count).to eq 26
expect(ProjectRole.count).to eq 5
expect(WorkPackageRole.count).to eq 3
@@ -92,7 +93,8 @@ RSpec.describe RootSeeder,
it "creates different types of queries" do
count_by_type = View.group(:type).count
expect(count_by_type).to eq(
- "work_packages_table" => 7,
+ "work_packages_table" => 5,
+ "gantt" => 2,
"team_planner" => 1
)
end
@@ -157,8 +159,9 @@ RSpec.describe RootSeeder,
expect(WorkPackage.count).to eq 36
expect(Wiki.count).to eq 2
expect(Query.having_views.count).to eq 8
- expect(View.where(type: "work_packages_table").count).to eq 7
+ expect(View.where(type: "work_packages_table").count).to eq 5
expect(View.where(type: "team_planner").count).to eq 1
+ expect(View.where(type: "gantt").count).to eq 2
expect(Query.count).to eq 26
expect(ProjectRole.count).to eq 5
expect(WorkPackageRole.count).to eq 3