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

Bim fix 34983: components.coloring.components not Array (#8803)

Wieland Lindenthal369d2c31a645
diff --git a/modules/bim/lib/open_project/bim/bcf_json/viewpoint_reader.rb b/modules/bim/lib/open_project/bim/bcf_json/viewpoint_reader.rb
index 40bbd102ec2..d48f15bc6b5 100644
--- a/modules/bim/lib/open_project/bim/bcf_json/viewpoint_reader.rb
+++ b/modules/bim/lib/open_project/bim/bcf_json/viewpoint_reader.rb
@@ -161,7 +161,7 @@ module OpenProject::Bim
entry['color'] = "##{entry['color']}"
# Fix items name
- entry['components'] = entry.delete('component')
+ entry['components'] = Array.wrap(entry.delete('component'))
entry
end
end
@@ -173,7 +173,7 @@ module OpenProject::Bim
# Hoist exceptions components up from the nested XML node
exceptions = visibility.dig('exceptions', 'component')
- visibility['exceptions'] = Array(exceptions) if exceptions
+ visibility['exceptions'] = Array.wrap(exceptions) if exceptions
# Move view_setup_hints
view_setup_hints = hash.dig('components', 'view_setup_hints')