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

[#62982] add spec for grouping with an inactive phase

Tobias Dillmann1de4e47ef57b
diff --git a/spec/features/work_packages/table/project_phase_field_spec.rb b/spec/features/work_packages/table/project_phase_field_spec.rb
index 3438a1609c2..8a556afad58 100644
--- a/spec/features/work_packages/table/project_phase_field_spec.rb
+++ b/spec/features/work_packages/table/project_phase_field_spec.rb
@@ -146,6 +146,17 @@ RSpec.describe "Project phase field in the work package table", :js do
wp_table.expect_work_package_with_attributes(other_wp, { projectPhase: "-" })
wp_table.expect_work_package_with_attributes(wp_without_phase, { projectPhase: "-" })
end
+
+ context "when grouping" do
+ let(:group_by) { :project_phase }
+
+ it "treats work packages with an inactive project phase like work packages without a project phase" do
+ wp_table.expect_groups({
+ project_phase.name => 1,
+ "-" => 2
+ })
+ end
+ end
end
context "without the necessary permissions" do