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
Ensure that IfcModel's conversion status is reset on update
Wieland Lindenthal69fd660a101b
diff --git a/modules/bim/app/services/bim/ifc_models/update_service.rb b/modules/bim/app/services/bim/ifc_models/update_service.rbindex dc4167d591d..4176eff51a4 100644--- a/modules/bim/app/services/bim/ifc_models/update_service.rb+++ b/modules/bim/app/services/bim/ifc_models/update_service.rb@@ -43,6 +43,10 @@ module Bim# attachments ourselvesmodel.attachments.select(&:marked_for_destruction?).each(&:destroy)+ model.conversion_status = ::Bim::IfcModels::IfcModel.conversion_statuses[:pending]+ model.conversion_error_message = nil+ model.save+if @ifc_attachment_updatedIfcConversionJob.perform_later(service_result.result)enddiff --git a/modules/bim/spec/services/ifc_models/update_service_spec.rb b/modules/bim/spec/services/ifc_models/update_service_spec.rbindex 9a588baa70c..1f20d75e9ae 100644--- a/modules/bim/spec/services/ifc_models/update_service_spec.rb+++ b/modules/bim/spec/services/ifc_models/update_service_spec.rb@@ -134,6 +134,11 @@ describe Bim::IfcModels::UpdateService dosubjectend++ it "sets the model's converstion_status to pending" do+ expect(model).to be_pending+ expect(model.conversion_error_message).to be_nil+ endendcontext 'if the SetAttributeService is unsuccessful' do