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 Phase start/end gates to the Phase Definition

Dombi Attila797fccf4529a
diff --git a/spec/factories/project_phase_definition_factory.rb b/spec/factories/project_phase_definition_factory.rb
index e9b5657169e..f0f032b3e03 100644
--- a/spec/factories/project_phase_definition_factory.rb
+++ b/spec/factories/project_phase_definition_factory.rb
@@ -31,5 +31,15 @@ FactoryBot.define do
sequence(:name) { |n| "Phase definition #{n}" }
color
+
+ trait :with_start_gate do
+ start_gate { true }
+ sequence(:start_gate_name) { |n| "Phase definition Start Gate #{n}" }
+ end
+
+ trait :with_end_gate do
+ end_gate { true }
+ sequence(:end_gate_name) { |n| "Phase definition End Gate #{n}" }
+ end
end
end
diff --git a/spec/factories/project_phase_factory.rb b/spec/factories/project_phase_factory.rb
index f5891efb57f..de8269b9676 100644
--- a/spec/factories/project_phase_factory.rb
+++ b/spec/factories/project_phase_factory.rb
@@ -28,22 +28,11 @@
FactoryBot.define do
factory :project_phase, class: "Project::Phase" do
- sequence(:name) { |n| "Project Phase #{n}" }
project
definition factory: :project_phase_definition
active { true }
start_date { Date.current - 2.days }
end_date { Date.current + 2.days }
-
- trait :with_start_gate do
- start_gate { true }
- sequence(:start_gate_name) { |n| "Project Start Gate #{n}" }
- end
-
- trait :with_end_gate do
- end_gate { true }
- sequence(:end_gate_name) { |n| "Project End Gate #{n}" }
- end
end
end