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

Add default Gates to seed data

Dombi Attilaeda9fa1760d3
diff --git a/app/seeders/common.yml b/app/seeders/common.yml
index 7a1906c505c..bfcb7bb71dc 100644
--- a/app/seeders/common.yml
+++ b/app/seeders/common.yml
@@ -72,6 +72,9 @@ colors:
- reference: :default_color_orange_dark
t_name: Orange (dark)
hexcode: "#F7983A"
+ - reference: :default_color_purple
+ t_name: Purple
+ hexcode: "#682D91"
- reference: :default_color_red_dark
t_name: Red (dark)
hexcode: "#F05823"
diff --git a/app/seeders/standard.yml b/app/seeders/standard.yml
index a94320ed2e4..3667853bbe2 100644
--- a/app/seeders/standard.yml
+++ b/app/seeders/standard.yml
@@ -31,14 +31,26 @@ life_cycles:
t_name: Initiating
type: Stage
color_name: :default_color_orange_dark
+ - reference: :default_life_cycle_ready_for_planning
+ t_name: Ready for Planning
+ type: Gate
+ color_name: :default_color_purple
- reference: :default_life_cycle_planning
t_name: Planning
type: Stage
color_name: :default_color_red_dark
+ - reference: :default_life_cycle_ready_for_executing
+ t_name: Ready for Executing
+ type: Gate
+ color_name: :default_color_purple
- reference: :default_life_cycle_executing
t_name: Executing
type: Stage
color_name: :default_color_magenta_light
+ - reference: :default_life_cycle_ready_for_closing
+ t_name: Ready for Closing
+ type: Gate
+ color_name: :default_color_purple
- reference: :default_life_cycle_closing
t_name: Closing
type: Stage
diff --git a/modules/bim/spec/seeders/root_seeder_bim_edition_spec.rb b/modules/bim/spec/seeders/root_seeder_bim_edition_spec.rb
index 1a9fe2e1391..1e4870b4a90 100644
--- a/modules/bim/spec/seeders/root_seeder_bim_edition_spec.rb
+++ b/modules/bim/spec/seeders/root_seeder_bim_edition_spec.rb
@@ -98,7 +98,7 @@ RSpec.describe RootSeeder,
)
end
- include_examples "it creates records", model: Color, expected_count: 148
+ include_examples "it creates records", model: Color, expected_count: 149
include_examples "it creates records", model: DocumentCategory, expected_count: 3
include_examples "it creates records", model: IssuePriority, expected_count: 4
include_examples "it creates records", model: Status, expected_count: 4
diff --git a/spec/seeders/root_seeder_standard_edition_spec.rb b/spec/seeders/root_seeder_standard_edition_spec.rb
index 9227a442464..63673e053d0 100644
--- a/spec/seeders/root_seeder_standard_edition_spec.rb
+++ b/spec/seeders/root_seeder_standard_edition_spec.rb
@@ -63,7 +63,8 @@ RSpec.describe RootSeeder,
expect(VersionSetting.count).to eq 4
expect(Boards::Grid.count).to eq 5
expect(Boards::Grid.count { |grid| grid.options.has_key?(:filters) }).to eq 1
- expect(LifeCycle.count).to eq 4
+ expect(Stage.count).to eq 4
+ expect(Gate.count).to eq 3
end
it "links work packages to their version" do
@@ -125,7 +126,7 @@ RSpec.describe RootSeeder,
)
end
- include_examples "it creates records", model: Color, expected_count: 148
+ include_examples "it creates records", model: Color, expected_count: 149
include_examples "it creates records", model: DocumentCategory, expected_count: 3
include_examples "it creates records", model: GlobalRole, expected_count: 2
include_examples "it creates records", model: WorkPackageRole, expected_count: 3
@@ -172,7 +173,8 @@ RSpec.describe RootSeeder,
expect(Version.count).to eq 4
expect(VersionSetting.count).to eq 4
expect(Boards::Grid.count).to eq 5
- expect(LifeCycle.count).to eq 4
+ expect(Stage.count).to eq 4
+ expect(Gate.count).to eq 3
end
end
end