From c88a13ed7c56eda8ab7e9297ffbca5feddf42195 Mon Sep 17 00:00:00 2001 From: Maya Berdygylyjova Date: Tue, 18 Oct 2022 09:45:49 +0200 Subject: [PATCH 1/4] Updating BIM Edition headings [#44512] Update BIM edition installation https://community.openproject.org/work_packages/44512 --- docs/installation-and-operations/bim-edition/README.md | 6 +++--- .../installation/docker/README.md | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/installation-and-operations/bim-edition/README.md b/docs/installation-and-operations/bim-edition/README.md index 404b330638..61a809142e 100644 --- a/docs/installation-and-operations/bim-edition/README.md +++ b/docs/installation-and-operations/bim-edition/README.md @@ -81,11 +81,11 @@ theme. Go to _-> Administration -> Design_ and from the _Themes_ drop down menu choose _OpenProject BIM_. -### Docker +## Docker installation OpenProject BIM -#### OpenProject BIM Edition with Docker Compose +### OpenProject BIM edition with Docker Compose -in order to use BIM Edition inside a docker-compose OpenProject installation, in the `docker-compose.override.yml` file in `x-op-app` > `environment` add one line +in order to use BIM edition inside a [docker-compose OpenProject installation](../installation/docker/), in the `docker-compose.override.yml` file in `x-op-app` > `environment` add one line ```yml OPENPROJECT_EDITION: "bim" diff --git a/docs/installation-and-operations/installation/docker/README.md b/docs/installation-and-operations/installation/docker/README.md index b9daa449af..b56dec8545 100644 --- a/docs/installation-and-operations/installation/docker/README.md +++ b/docs/installation-and-operations/installation/docker/README.md @@ -77,7 +77,7 @@ Please be aware that only those variables shall be edited which are documented a #### BIM Edition -In order to install or change to BIM inside a Docker environment, please navigate to the [Docker](../../bim-edition/#docker) paragraph at the BIM Edition documentation. +In order to install or change to BIM inside a Docker environment, please navigate to the [Docker Installation for OpenProject BIM](../../bim-edition/#docker-installation-openproject-bim) paragraph at the BIM edition documentation. ### Disabling services in the docker-compose file From de83aebe827c556e0af86d6fdf62107f2e638b04 Mon Sep 17 00:00:00 2001 From: Christophe Bliard Date: Thu, 13 Oct 2022 17:00:03 +0200 Subject: [PATCH 2/4] [#43763] Set default active work package custom fields only if not provided https://community.openproject.org/work_packages/43763 --- .../projects/set_attributes_service.rb | 6 ++-- .../projects/copy_service_integration_spec.rb | 28 +++++++++++++++++++ 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/app/services/projects/set_attributes_service.rb b/app/services/projects/set_attributes_service.rb index a42e3ec8bf..3d3b630358 100644 --- a/app/services/projects/set_attributes_service.rb +++ b/app/services/projects/set_attributes_service.rb @@ -47,7 +47,7 @@ module Projects set_default_public(attribute_keys.include?('public')) set_default_module_names(attribute_keys.include?('enabled_module_names')) set_default_types(attribute_keys.include?('types') || attribute_keys.include?('type_ids')) - set_default_active_work_package_custom_fields + set_default_active_work_package_custom_fields(attribute_keys.include?('work_package_custom_fields')) end def set_default_public(provided) @@ -62,7 +62,9 @@ module Projects model.types = ::Type.default if !provided && model.types.empty? end - def set_default_active_work_package_custom_fields + def set_default_active_work_package_custom_fields(provided) + return if provided + model.work_package_custom_fields = WorkPackageCustomField.joins(:types).where(types: { id: model.type_ids }) end diff --git a/spec/services/projects/copy_service_integration_spec.rb b/spec/services/projects/copy_service_integration_spec.rb index a59aa968ab..7d07e6a944 100644 --- a/spec/services/projects/copy_service_integration_spec.rb +++ b/spec/services/projects/copy_service_integration_spec.rb @@ -744,6 +744,34 @@ describe Projects::CopyService, 'integration', type: :model do expect(cv.map(&:formatted_value)).to contain_exactly('A', 'B') end end + + context 'with disabled work package custom field' do + it 'is still disabled in the copy' do + custom_field = create(:text_wp_custom_field) + create(:type_task, + projects: [source], + custom_fields: [custom_field]) + + expect(subject).to be_success + + expect(source.work_package_custom_fields).to eq([]) + expect(project_copy.work_package_custom_fields).to match_array(source.work_package_custom_fields) + end + end + + context 'with enabled work package custom field' do + it 'is still enabled in the copy' do + custom_field = create(:text_wp_custom_field, projects: [source]) + create(:type_task, + projects: [source], + custom_fields: [custom_field]) + + expect(subject).to be_success + + expect(source.work_package_custom_fields).to eq([custom_field]) + expect(project_copy.work_package_custom_fields).to match_array(source.work_package_custom_fields) + end + end end end end From 277c061db79992e84249b5a20638695acdf88c2e Mon Sep 17 00:00:00 2001 From: Birthe Lindenthal Date: Tue, 18 Oct 2022 14:46:56 +0200 Subject: [PATCH 3/4] Fix small typo (#11462) --- docs/installation-and-operations/bim-edition/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/installation-and-operations/bim-edition/README.md b/docs/installation-and-operations/bim-edition/README.md index 61a809142e..1446ff7bad 100644 --- a/docs/installation-and-operations/bim-edition/README.md +++ b/docs/installation-and-operations/bim-edition/README.md @@ -85,7 +85,7 @@ Go to _-> Administration -> Design_ and from the _Themes_ drop down menu choose ### OpenProject BIM edition with Docker Compose -in order to use BIM edition inside a [docker-compose OpenProject installation](../installation/docker/), in the `docker-compose.override.yml` file in `x-op-app` > `environment` add one line +In order to use BIM edition inside a [docker-compose OpenProject installation](../installation/docker/), in the `docker-compose.override.yml` file in `x-op-app` > `environment` add one line ```yml OPENPROJECT_EDITION: "bim" From 53c42e8def9de926b99ce22e40bfaee3909a6f0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20G=C3=BCnther?= Date: Tue, 18 Oct 2022 19:57:38 +0200 Subject: [PATCH 4/4] Hide more empty action bars on mobile --- .../app/features/boards/new-board-modal/new-board-modal.html | 2 +- modules/webhooks/app/cells/views/response_body.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/app/features/boards/new-board-modal/new-board-modal.html b/frontend/src/app/features/boards/new-board-modal/new-board-modal.html index bf157eb7b5..5716116870 100644 --- a/frontend/src/app/features/boards/new-board-modal/new-board-modal.html +++ b/frontend/src/app/features/boards/new-board-modal/new-board-modal.html @@ -30,7 +30,7 @@ -
+
-
+