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
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Handle missing viewpoint_names and make snapshot filename unique
Oliver Günther22058d376b36
diff --git a/app/models/attachment.rb b/app/models/attachment.rbindex b009ff305af..5b36c930b7c 100644--- a/app/models/attachment.rb+++ b/app/models/attachment.rb@@ -153,6 +153,13 @@ class Attachment < ActiveRecord::Baseattributes['file']end+ ##+ # Returns the file extension name,+ # if any (with leading dot)+ def extension+ File.extname filename+ end+def file=(file)super.tap doset_file_size filediff --git a/modules/bim/lib/open_project/bim/bcf_xml/exporter.rb b/modules/bim/lib/open_project/bim/bcf_xml/exporter.rbindex 460b4ee700d..13b886e7a0c 100644--- a/modules/bim/lib/open_project/bim/bcf_xml/exporter.rb+++ b/modules/bim/lib/open_project/bim/bcf_xml/exporter.rb@@ -127,8 +127,8 @@ module OpenProject::Bim::BcfXmldef viewpoints_for(issue_dir, issue)[].tap do |files|issue.viewpoints.find_each do |vp|- vp_file = File.join(issue_dir, vp.viewpoint_name)- snapshot_file = File.join(issue_dir, vp.snapshot.filename)+ vp_file = File.join(issue_dir, "#{vp.uuid}.xml")+ snapshot_file = File.join(issue_dir, "#{vp.uuid}#{vp.snapshot.extension}")# Copy the filesdump_file vp_file, ViewpointWriter.new(vp).to_xml