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

correct order of versions in version custom field ordering

Ivan Kuchin7f8798557a43
diff --git a/spec/models/queries/projects/project_query_custom_field_order_spec.rb b/spec/models/queries/projects/project_query_custom_field_order_spec.rb
index fd13984ed99..5958575f31b 100644
--- a/spec/models/queries/projects/project_query_custom_field_order_spec.rb
+++ b/spec/models/queries/projects/project_query_custom_field_order_spec.rb
@@ -316,10 +316,10 @@ RSpec.describe ProjectQuery, "order using CustomFieldOrder" do
let(:projects) do
[
- project_with_cf_value(id_by_name.fetch("10.10.10")),
- project_with_cf_value(id_by_name.fetch("10.10.2")),
- project_with_cf_value(id_by_name.fetch("10.2")),
project_with_cf_value(id_by_name.fetch("9")),
+ project_with_cf_value(id_by_name.fetch("10.2")),
+ project_with_cf_value(id_by_name.fetch("10.10.2")),
+ project_with_cf_value(id_by_name.fetch("10.10.10")),
project # TODO: should be at index 0
]
end
@@ -332,12 +332,12 @@ RSpec.describe ProjectQuery, "order using CustomFieldOrder" do
let(:projects) do
[
- project_with_cf_value(*id_by_name.fetch_values("10.10.10")), # 10.10.10
- project_with_cf_value(*id_by_name.fetch_values("9", "10.10.10")), # 10.10.10, 9
- project_with_cf_value(*id_by_name.fetch_values("10.10.10", "9")), # 10.10.10, 9
+ project_with_cf_value(*id_by_name.fetch_values("10.10.2", "9")), # 9, 10.10.2
+ project_with_cf_value(*id_by_name.fetch_values("10.10.10", "9")), # 9, 10.10.10
+ project_with_cf_value(*id_by_name.fetch_values("9", "10.10.10")), # 9, 10.10.10
+ project_with_cf_value(*id_by_name.fetch_values("10.2", "10.10.2")), # 10.2, 10.10.2
project_with_cf_value(*id_by_name.fetch_values("10.10.2")), # 10.10.2
- project_with_cf_value(*id_by_name.fetch_values("10.2", "10.10.2")), # 10.10.2, 10.2
- project_with_cf_value(*id_by_name.fetch_values("10.10.2", "9")), # 10.10.2, 9
+ project_with_cf_value(*id_by_name.fetch_values("10.10.10")), # 10.10.10
project # TODO: should be at index 0
]
end
diff --git a/spec/models/query/results_cf_sorting_integration_spec.rb b/spec/models/query/results_cf_sorting_integration_spec.rb
index 50cf643c9a4..74e2f9865b3 100644
--- a/spec/models/query/results_cf_sorting_integration_spec.rb
+++ b/spec/models/query/results_cf_sorting_integration_spec.rb
@@ -308,10 +308,10 @@ RSpec.describe Query::Results, "Sorting by custom field" do
let(:work_packages) do
[
- wp_with_cf_value(id_by_name.fetch("10.10.10")),
- wp_with_cf_value(id_by_name.fetch("10.10.2")),
- wp_with_cf_value(id_by_name.fetch("10.2")),
wp_with_cf_value(id_by_name.fetch("9")),
+ wp_with_cf_value(id_by_name.fetch("10.2")),
+ wp_with_cf_value(id_by_name.fetch("10.10.2")),
+ wp_with_cf_value(id_by_name.fetch("10.10.10")),
wp_without_cf_value # TODO: should be at index 0
]
end
@@ -324,12 +324,12 @@ RSpec.describe Query::Results, "Sorting by custom field" do
let(:work_packages) do
[
- wp_with_cf_value(id_by_name.fetch_values("10.10.10")), # 10.10.10
- wp_with_cf_value(id_by_name.fetch_values("9", "10.10.10")), # 10.10.10, 9
- wp_with_cf_value(id_by_name.fetch_values("10.10.10", "9")), # 10.10.10, 9
+ wp_with_cf_value(id_by_name.fetch_values("10.10.2", "9")), # 9, 10.10.2
+ wp_with_cf_value(id_by_name.fetch_values("10.10.10", "9")), # 9, 10.10.10
+ wp_with_cf_value(id_by_name.fetch_values("9", "10.10.10")), # 9, 10.10.10
+ wp_with_cf_value(id_by_name.fetch_values("10.2", "10.10.2")), # 10.2, 10.10.2
wp_with_cf_value(id_by_name.fetch_values("10.10.2")), # 10.10.2
- wp_with_cf_value(id_by_name.fetch_values("10.2", "10.10.2")), # 10.10.2, 10.2
- wp_with_cf_value(id_by_name.fetch_values("10.10.2", "9")), # 10.10.2, 9
+ wp_with_cf_value(id_by_name.fetch_values("10.10.10")), # 10.10.10
wp_without_cf_value # TODO: should be at index 0
]
end