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

Fix: Use the BCF UUID for initializing Bcf::Issue models.

Wieland Lindenthal66728de5e6c8
diff --git a/modules/bcf/lib/open_project/bcf/bcf_xml/issue_reader.rb b/modules/bcf/lib/open_project/bcf/bcf_xml/issue_reader.rb
index 6a1a302c7dc..4f54774c387 100644
--- a/modules/bcf/lib/open_project/bcf/bcf_xml/issue_reader.rb
+++ b/modules/bcf/lib/open_project/bcf/bcf_xml/issue_reader.rb
@@ -319,7 +319,7 @@ module OpenProject::Bcf::BcfXml
.joins(:work_package)
.where(uuid: topic_uuid, 'work_packages.project_id': @project.id)
.references(:work_package).first ||
- ::Bcf::Issue.new
+ ::Bcf::Issue.new(uuid: topic_uuid)
end
##
diff --git a/modules/bcf/spec/bcf/bcf_xml/issue_reader_spec.rb b/modules/bcf/spec/bcf/bcf_xml/issue_reader_spec.rb
index 027ccd974d5..b094156fdd5 100644
--- a/modules/bcf/spec/bcf/bcf_xml/issue_reader_spec.rb
+++ b/modules/bcf/spec/bcf/bcf_xml/issue_reader_spec.rb
@@ -108,6 +108,7 @@ describe ::OpenProject::Bcf::BcfXml::IssueReader do
let(:bcf_issue) { subject.extract! }
it 'WP start date gets initialized with BCF CreationDate' do
+ expect(bcf_issue.uuid).to eql("63E78882-7C6A-4BF7-8982-FC478AFB9C97")
expect(bcf_issue.work_package.start_date).to eql(subject.extractor.creation_date.to_date)
end
end