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

[#38960] Viewpoint files must end with .bcfv

Eric Schubertb23a3638f77a
diff --git a/modules/bim/lib/open_project/bim/bcf_xml/exporter.rb b/modules/bim/lib/open_project/bim/bcf_xml/exporter.rb
index 1894f5e01b9..be00d9636d3 100644
--- a/modules/bim/lib/open_project/bim/bcf_xml/exporter.rb
+++ b/modules/bim/lib/open_project/bim/bcf_xml/exporter.rb
@@ -123,7 +123,7 @@ module OpenProject::Bim::BcfXml
def viewpoints_for(issue_dir, issue)
[].tap do |files|
issue.viewpoints.find_each do |vp|
- vp_file = File.join(issue_dir, "#{vp.uuid}.xml")
+ vp_file = File.join(issue_dir, "#{vp.uuid}.bcfv")
snapshot_file = File.join(issue_dir, "#{vp.uuid}#{vp.snapshot.extension}")
# Copy the files
diff --git a/modules/bim/lib/open_project/bim/bcf_xml/issue_writer.rb b/modules/bim/lib/open_project/bim/bcf_xml/issue_writer.rb
index aff9095eae8..68c4fdec49d 100644
--- a/modules/bim/lib/open_project/bim/bcf_xml/issue_writer.rb
+++ b/modules/bim/lib/open_project/bim/bcf_xml/issue_writer.rb
@@ -222,7 +222,7 @@ module OpenProject::Bim::BcfXml
def viewpoints(xml)
issue.viewpoints.find_each do |vp|
xml.Viewpoints "Guid" => vp.uuid do
- xml.Viewpoint "#{vp.uuid}.xml"
+ xml.Viewpoint "#{vp.uuid}.bcfv"
xml.Snapshot "#{vp.uuid}#{vp.snapshot.extension}"
end
end
diff --git a/modules/bim/spec/bcf/bcf_xml/issue_writer_spec.rb b/modules/bim/spec/bcf/bcf_xml/issue_writer_spec.rb
index 9afff4a4c7b..074fe033280 100644
--- a/modules/bim/spec/bcf/bcf_xml/issue_writer_spec.rb
+++ b/modules/bim/spec/bcf/bcf_xml/issue_writer_spec.rb
@@ -182,7 +182,7 @@ describe ::OpenProject::Bim::BcfXml::IssueWriter do
it 'replaces the BCF viewpoints names to use its uuid only' do
uuid = bcf_issue.viewpoints.first.uuid
viewpoint_node = subject.at("/Markup/Viewpoints[@Guid='#{uuid}']")
- expect(viewpoint_node.at('Viewpoint').content).to eql("#{uuid}.xml")
+ expect(viewpoint_node.at('Viewpoint').content).to eql("#{uuid}.bcfv")
expect(viewpoint_node.at('Snapshot').content).to eql("#{uuid}.png")
end
end