diff --git a/Gemfile.lock b/Gemfile.lock index 962f2f6f14..081b405d0d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -188,28 +188,28 @@ GEM remote: https://rubygems.org/ specs: Ascii85 (1.1.0) - actioncable (6.1.4.3) - actionpack (= 6.1.4.3) - activesupport (= 6.1.4.3) + actioncable (6.1.4.4) + actionpack (= 6.1.4.4) + activesupport (= 6.1.4.4) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (6.1.4.3) - actionpack (= 6.1.4.3) - activejob (= 6.1.4.3) - activerecord (= 6.1.4.3) - activestorage (= 6.1.4.3) - activesupport (= 6.1.4.3) + actionmailbox (6.1.4.4) + actionpack (= 6.1.4.4) + activejob (= 6.1.4.4) + activerecord (= 6.1.4.4) + activestorage (= 6.1.4.4) + activesupport (= 6.1.4.4) mail (>= 2.7.1) - actionmailer (6.1.4.3) - actionpack (= 6.1.4.3) - actionview (= 6.1.4.3) - activejob (= 6.1.4.3) - activesupport (= 6.1.4.3) + actionmailer (6.1.4.4) + actionpack (= 6.1.4.4) + actionview (= 6.1.4.4) + activejob (= 6.1.4.4) + activesupport (= 6.1.4.4) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (6.1.4.3) - actionview (= 6.1.4.3) - activesupport (= 6.1.4.3) + actionpack (6.1.4.4) + actionview (= 6.1.4.4) + activesupport (= 6.1.4.4) rack (~> 2.0, >= 2.0.9) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) @@ -217,30 +217,30 @@ GEM actionpack-xml_parser (2.0.1) actionpack (>= 5.0) railties (>= 5.0) - actiontext (6.1.4.3) - actionpack (= 6.1.4.3) - activerecord (= 6.1.4.3) - activestorage (= 6.1.4.3) - activesupport (= 6.1.4.3) + actiontext (6.1.4.4) + actionpack (= 6.1.4.4) + activerecord (= 6.1.4.4) + activestorage (= 6.1.4.4) + activesupport (= 6.1.4.4) nokogiri (>= 1.8.5) - actionview (6.1.4.3) - activesupport (= 6.1.4.3) + actionview (6.1.4.4) + activesupport (= 6.1.4.4) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) - activejob (6.1.4.3) - activesupport (= 6.1.4.3) + activejob (6.1.4.4) + activesupport (= 6.1.4.4) globalid (>= 0.3.6) - activemodel (6.1.4.3) - activesupport (= 6.1.4.3) + activemodel (6.1.4.4) + activesupport (= 6.1.4.4) activemodel-serializers-xml (1.0.2) activemodel (> 5.x) activesupport (> 5.x) builder (~> 3.1) - activerecord (6.1.4.3) - activemodel (= 6.1.4.3) - activesupport (= 6.1.4.3) + activerecord (6.1.4.4) + activemodel (= 6.1.4.4) + activesupport (= 6.1.4.4) activerecord-import (1.2.0) activerecord (>= 3.2) activerecord-nulldb-adapter (0.8.0) @@ -251,14 +251,14 @@ GEM multi_json (~> 1.11, >= 1.11.2) rack (>= 2.0.8, < 3) railties (>= 5.2.4.1) - activestorage (6.1.4.3) - actionpack (= 6.1.4.3) - activejob (= 6.1.4.3) - activerecord (= 6.1.4.3) - activesupport (= 6.1.4.3) + activestorage (6.1.4.4) + actionpack (= 6.1.4.4) + activejob (= 6.1.4.4) + activerecord (= 6.1.4.4) + activesupport (= 6.1.4.4) marcel (~> 1.0.0) mini_mime (>= 1.1.0) - activesupport (6.1.4.3) + activesupport (6.1.4.4) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) @@ -734,20 +734,20 @@ GEM rack_session_access (0.2.0) builder (>= 2.0.0) rack (>= 1.0.0) - rails (6.1.4.3) - actioncable (= 6.1.4.3) - actionmailbox (= 6.1.4.3) - actionmailer (= 6.1.4.3) - actionpack (= 6.1.4.3) - actiontext (= 6.1.4.3) - actionview (= 6.1.4.3) - activejob (= 6.1.4.3) - activemodel (= 6.1.4.3) - activerecord (= 6.1.4.3) - activestorage (= 6.1.4.3) - activesupport (= 6.1.4.3) + rails (6.1.4.4) + actioncable (= 6.1.4.4) + actionmailbox (= 6.1.4.4) + actionmailer (= 6.1.4.4) + actionpack (= 6.1.4.4) + actiontext (= 6.1.4.4) + actionview (= 6.1.4.4) + activejob (= 6.1.4.4) + activemodel (= 6.1.4.4) + activerecord (= 6.1.4.4) + activestorage (= 6.1.4.4) + activesupport (= 6.1.4.4) bundler (>= 1.15.0) - railties (= 6.1.4.3) + railties (= 6.1.4.4) sprockets-rails (>= 2.0.0) rails-controller-testing (1.0.5) actionpack (>= 5.0.1.rc1) @@ -761,9 +761,9 @@ GEM rails-i18n (6.0.0) i18n (>= 0.7, < 2) railties (>= 6.0.0, < 7) - railties (6.1.4.3) - actionpack (= 6.1.4.3) - activesupport (= 6.1.4.3) + railties (6.1.4.4) + actionpack (= 6.1.4.4) + activesupport (= 6.1.4.4) method_source rake (>= 0.13) thor (~> 1.0) diff --git a/docs/installation-and-operations/misc/migration-to-postgresql13/README.md b/docs/installation-and-operations/misc/migration-to-postgresql13/README.md index f3666862ce..b2a29a5dc3 100644 --- a/docs/installation-and-operations/misc/migration-to-postgresql13/README.md +++ b/docs/installation-and-operations/misc/migration-to-postgresql13/README.md @@ -104,6 +104,10 @@ Please follow this section only if you have installed OpenProject using [this pr Before attempting the upgrade, please ensure you have performed a backup of your installation by following the [backup guide](../../operation/backing-up/). +You can find the upgrade instructions for your docker-compose setup in the [openproject-deploy](https://github.com/opf/openproject-deploy/blob/stable/12/compose/control/README.md#upgrade) repository. + +Remember that you need to have checked out that repository and work in the `compose` directory for the instructions to work. + [compose-based-installation]: ../../installation/docker/#one-container-per-process-recommended ## All-in-one docker installation diff --git a/modules/bim/app/views/bim/ifc_models/ifc_models/_form.html.erb b/modules/bim/app/views/bim/ifc_models/ifc_models/_form.html.erb index 9246947a0b..216780a3bc 100644 --- a/modules/bim/app/views/bim/ifc_models/ifc_models/_form.html.erb +++ b/modules/bim/app/views/bim/ifc_models/ifc_models/_form.html.erb @@ -95,6 +95,9 @@ See COPYRIGHT and LICENSE files for more details. } }); }; + jQuery("#bim_ifc_models_ifc_model_is_default").change(function(e){ + setDirectUploadFileName(); + }); jQuery("input[type=file]").change(function(e){ setDirectUploadFileName(); diff --git a/modules/bim/spec/features/ifc_models/ifc_upload_shared_examples.rb b/modules/bim/spec/features/ifc_models/ifc_upload_shared_examples.rb index b77730accf..1ff631b0fb 100644 --- a/modules/bim/spec/features/ifc_models/ifc_upload_shared_examples.rb +++ b/modules/bim/spec/features/ifc_models/ifc_upload_shared_examples.rb @@ -2,6 +2,7 @@ shared_examples 'can upload an IFC file' do let(:user) { FactoryBot.create :admin } let(:project) { FactoryBot.create :project, enabled_module_names: %i[bim] } let(:ifc_fixture) { ::UploadedFile.load_from('modules/bim/spec/fixtures/files/minimal.ifc') } + let(:set_tick_is_default_after_file) { true } before do login_as user @@ -9,18 +10,34 @@ shared_examples 'can upload an IFC file' do allow_any_instance_of(Bim::IfcModels::BaseContract).to receive(:ifc_attachment_is_ifc).and_return true end - it 'should allow uploading an IFC file' do - visit new_bcf_project_ifc_model_path(project_id: project.identifier) + shared_examples 'allows uploading an IFC file' do + it 'allows uploading an IFC file' do + visit new_bcf_project_ifc_model_path(project_id: project.identifier) - page.attach_file("file", ifc_fixture.path, visible: :all) + page.find('#bim_ifc_models_ifc_model_is_default').set(true) unless set_tick_is_default_after_file + page.attach_file("file", ifc_fixture.path, visible: :all) + page.find('#bim_ifc_models_ifc_model_is_default').set true if set_tick_is_default_after_file - click_on "Create" + click_on "Create" - expect(page).to have_content("Upload succeeded") + expect(page).to have_content("Upload succeeded") - expect(Attachment.count).to eq 1 - expect(Attachment.first[:file]).to eq model_name + expect(Attachment.count).to eq 1 + expect(Attachment.first[:file]).to eq model_name - expect(Bim::IfcModels::IfcModel.count).to eq 1 + expect(Bim::IfcModels::IfcModel.count).to eq 1 + + expect(Bim::IfcModels::IfcModel.first.is_default).to be_truthy + end + end + + context 'when setting checkbox is_default before selecting file' do + let(:set_tick_is_default_after_file) { false } + + it_behaves_like 'allows uploading an IFC file' + end + + context 'when setting checkbox is_default after selecting file' do + it_behaves_like 'allows uploading an IFC file' end end