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
Fix double render bug in BCF XML import
Wieland Lindenthal6ba3e4d74499
diff --git a/modules/bim/app/controllers/bim/bcf/issues_controller.rb b/modules/bim/app/controllers/bim/bcf/issues_controller.rbindex d4125c72894..9bb775a432c 100644--- a/modules/bim/app/controllers/bim/bcf/issues_controller.rb+++ b/modules/bim/app/controllers/bim/bcf/issues_controller.rb@@ -68,6 +68,21 @@ module Bimenddef perform_import+ import_file+ rescue StandardError => e+ flash[:error] = I18n.t('bcf.bcf_xml.import_failed', error: e.message)+ redirect_to action: :upload+ ensure+ @bcf_attachment&.destroy+ end++ def redirect_to_bcf_issues_listset+ redirect_to defaults_bcf_project_ifc_models_path(@project)+ end++ private++ def import_fileset_import_optionsresults = @importer.import!(@import_options).flatten@@ -79,19 +94,8 @@ module Bim@issues[:successful] << issueendend- rescue StandardError => e- flash[:error] = I18n.t('bcf.bcf_xml.import_failed', error: e.message)- redirect_to action: :upload- ensure- @bcf_attachment&.destroyend- def redirect_to_bcf_issues_list- redirect_to defaults_bcf_project_ifc_models_path(@project)- end-- private-def import_canceled?if %i[unknown_types_actionunknown_statuses_action@@ -133,7 +137,7 @@ module Bimelsif render_config_non_members?render_config_non_memberselse- perform_import+ import_filerender :perform_importendend