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
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Update Seeder and Seed Data with new table structure
Aaron Contreras8968c1b66193
diff --git a/app/seeders/demo_data/project_seeder.rb b/app/seeders/demo_data/project_seeder.rbindex 4cd0ab7b941..d451f90ac51 100644--- a/app/seeders/demo_data/project_seeder.rb+++ b/app/seeders/demo_data/project_seeder.rb@@ -35,7 +35,6 @@ module DemoDataprint_status " ↳ Creating project: #{project_data.lookup('name')}"self.project = reset_project- set_project_statusset_membersseed_newsset_types@@ -73,21 +72,6 @@ module DemoDataProject.create! project_attributesend- def set_project_status- print_status ' -Setting project status.'-- status_code = project_data.lookup('status.code')- status_explanation = project_data.lookup('status.description')-- if status_code || status_explanation- Projects::Status.create!(- project:,- code: status_code,- explanation: status_explanation- )- end- end-def set_membersprint_status ' -Setting members.'@@ -160,6 +144,8 @@ module DemoData{name: project_data.lookup('name'),identifier: project_data.lookup('identifier'),+ status_code: project_data.lookup('status_code'),+ status_explanation: project_data.lookup('status_explanation'),description: project_data.lookup('description'),enabled_module_names: project_data.lookup('modules'),types: Type.all,diff --git a/app/seeders/standard.yml b/app/seeders/standard.ymlindex 351d435cf82..9050dec29d0 100644--- a/app/seeders/standard.yml+++ b/app/seeders/standard.yml@@ -43,9 +43,8 @@ projects:demo-project:t_name: Demo projectidentifier: demo-project- status:- code: on_track- t_description: All tasks are on schedule. The people involved know their tasks. The system is completely set up.+ status_code: on_track+ t_status_explanation: All tasks are on schedule. The people involved know their tasks. The system is completely set up.t_description: This is a short summary of the goals of this demo project.modules:- work_package_tracking@@ -322,9 +321,8 @@ projects:scrum-project:t_name: Scrum projectidentifier: your-scrum-project- status:- code: on_track- t_description: All tasks are on schedule. The people involved know their tasks. The system is completely set up.+ status_code: on_track+ t_status_explanation: All tasks are on schedule. The people involved know their tasks. The system is completely set up.t_description: This is a short summary of the goals of this demo Scrum project.modules:- backlogsdiff --git a/config/locales/en.seeders.standard.yml.example b/config/locales/en.seeders.standard.yml.exampleindex f9874ff0de3..cf27bb5bb0b 100644--- a/config/locales/en.seeders.standard.yml.example+++ b/config/locales/en.seeders.standard.yml.example@@ -55,9 +55,8 @@ en:demo-project:name: Demo projectidentifier: demo-project- status:- code: off_track- description: Everything is behind the deadline. We will never make it.+ status_code: off_track+ status_explanation: Everything is behind the deadline. We will never make it.description: >**This is a demo project**. You can edit the description inthe [Project settings -> Description]({{opSetting:base_url}}/projects/demo-project/settings).diff --git a/modules/bim/app/seeders/bim.yml b/modules/bim/app/seeders/bim.ymlindex 88c6224390d..798463ad5a7 100644--- a/modules/bim/app/seeders/bim.yml+++ b/modules/bim/app/seeders/bim.yml@@ -81,10 +81,11 @@ projects:demo-construction-project:t_name: (Demo) Construction projectidentifier: demo-construction-project- status:- code: on_track- t_description: All tasks and the sub-projects are on schedule. The people involved know their tasks. The system is completely set up.+ status_code: on_track+ t_status_explanation: All tasks and the sub-projects are on schedule. The people involved know their tasks. The system is completely set up.t_description: This is a short summary of the goals of this demo construction project.+ timeline:+ name: Timelinemodules:- work_package_tracking- news@@ -227,9 +228,8 @@ projects:demo-planning-constructing-project:t_name: (Demo) Planning & constructingidentifier: demo-planning-constructing-project- status:- code: on_track- t_description: All tasks are on schedule. The people involved know their tasks. The system is completely set up.+ status_code: on_track+ t_status_explanation: All tasks are on schedule. The people involved know their tasks. The system is completely set up.parent: demo-construction-projectt_description: This is a short summary of the goals of this demo planning and constructing project.modules:@@ -694,9 +694,8 @@ projects:demo-bim-project:t_name: (Demo) BIM projectidentifier: demo-bim-project- status:- code: on_track- t_description: All tasks and sub-projects are on schedule. The people involved know their tasks. The system is completely set up.+ status_code: on_track+ t_status_explanation: All tasks and sub-projects are on schedule. The people involved know their tasks. The system is completely set up.parent: demo-construction-projectt_description: This is a short summary of the goals of this demo BIM project.modules:@@ -1277,9 +1276,8 @@ projects:demo-bcf-management-project:t_name: (Demo) BCF managementidentifier: demo-bcf-management-project- status:- code: on_track- t_description: All tasks are on schedule. The people involved know their tasks. The system is completely set up.+ status_code: on_track+ t_status_explanation: All tasks are on schedule. The people involved know their tasks. The system is completely set up.parent: demo-bim-projectt_description: This is a short summary of the goals of this demo BCF management project.modules:diff --git a/modules/bim/spec/seeders/root_seeder_bim_edition_spec.rb b/modules/bim/spec/seeders/root_seeder_bim_edition_spec.rbindex 1e21a31e829..1b9dac6cc6f 100644--- a/modules/bim/spec/seeders/root_seeder_bim_edition_spec.rb+++ b/modules/bim/spec/seeders/root_seeder_bim_edition_spec.rb@@ -50,7 +50,6 @@ describe RootSeeder,expect(Type.count).to eq 7expect(Status.count).to eq 4expect(IssuePriority.count).to eq 4- expect(Projects::Status.count).to eq 4expect(Bim::IfcModels::IfcModel.count).to eq 3expect(Grids::Overview.count).to eq 4expect(Boards::Grid.count).to eq 2diff --git a/spec/seeders/root_seeder_standard_edition_spec.rb b/spec/seeders/root_seeder_standard_edition_spec.rbindex fe212918ce2..79aa92f36cf 100644--- a/spec/seeders/root_seeder_standard_edition_spec.rb+++ b/spec/seeders/root_seeder_standard_edition_spec.rb@@ -51,7 +51,6 @@ describe RootSeeder,expect(View.where(type: 'work_packages_table').count).to eq 7expect(View.where(type: 'team_planner').count).to eq 1expect(Query.count).to eq 26- expect(Projects::Status.count).to eq 2expect(Role.where(type: 'Role').count).to eq 5expect(GlobalRole.count).to eq 1expect(Grids::Overview.count).to eq 2@@ -104,7 +103,6 @@ describe RootSeeder,expect(View.where(type: 'work_packages_table').count).to eq 7expect(View.where(type: 'team_planner').count).to eq 1expect(Query.count).to eq 26- expect(Projects::Status.count).to eq 2expect(Role.where(type: 'Role').count).to eq 5expect(GlobalRole.count).to eq 1expect(Grids::Overview.count).to eq 2