Merge remote-tracking branch 'origin/release/12.3' into dev

pull/11466/head
Oliver Günther 2 years ago
commit d8076b0edf
No known key found for this signature in database
GPG Key ID: 88872239EB414F99
  1. 6
      app/services/projects/set_attributes_service.rb
  2. 6
      docs/installation-and-operations/bim-edition/README.md
  3. 2
      docs/installation-and-operations/installation/docker/README.md
  4. 2
      frontend/src/app/features/boards/new-board-modal/new-board-modal.html
  5. 2
      modules/webhooks/app/cells/views/response_body.erb
  6. 28
      spec/services/projects/copy_service_integration_spec.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

@ -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"

@ -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

@ -30,7 +30,7 @@
</section>
</div>
<div class="spot-action-bar">
<div class="spot-action-bar hidden-for-mobile">
<div class="spot-action-bar--right">
<button
type="button"

@ -20,7 +20,7 @@
<%= log_entry.response_body %>
</pre>
</div>
<div class="spot-action-bar">
<div class="spot-action-bar hidden-for-mobile">
<div class="spot-action-bar--right">
<button
class="button button_no-margin spot-action-bar--action spot-modal--cancel-button"

@ -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

Loading…
Cancel
Save