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
Merge branch 'release/11.4' into feature/38981-merge-changes-of-114
Eric Schubertece686d6008c
diff --cc app/services/attachments/create_service.rbindex 9c5d4b29f5e,506b24d76a6..0b820373703--- a/app/services/attachments/create_service.rb+++ b/app/services/attachments/create_service.rb@@@ -23,77 -23,67 +23,67 @@@# along with this program; if not, write to the Free Software# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.#-# See docs/COPYRIGHT.rdoc for more details.+# See COPYRIGHT and LICENSE files for more details.#++- class Attachments::CreateService < ::BaseServices::Create- include Attachments::TouchContainer+ module Attachments+ class CreateService < BaseService+ include TouchContainer- around_call :error_wrapped_call+ around_call :error_wrapped_call- ##- # Create an attachment service bypassing the user-provided whitelist- # for internal purposes such as exporting data.- #- # @param user The user to call the service with- # @param whitelist A custom whitelist to validate with, or empty to disable validation- #- # Warning: When passing an empty whitelist, this results in no validations on the content type taking place.- def self.bypass_whitelist(user:, whitelist: [])- new(user: user, contract_options: { whitelist: whitelist.map(&:to_s) })- end-- def persist(call)- attachment = call.result- if attachment.container- in_container_mutex(attachment.container) { super }- else- super+ def persist(call)+ attachment = call.result+ if attachment.container+ in_container_mutex(attachment.container) { super }+ else+ super+ endend- end- def in_container_mutex(container)- OpenProject::Mutex.with_advisory_lock_transaction(container) do- yield.tap do- # Get the latest attachments to ensure having them all for journalization.- # We just created an attachment and a different worker might have added attachments- # in the meantime, e.g when bulk uploading.- container.attachments.reload+ def in_container_mutex(container)+ OpenProject::Mutex.with_advisory_lock_transaction(container) do+ yield.tap do+ # Get the latest attachments to ensure having them all for journalization.+ # We just created an attachment and a different worker might have added attachments+ # in the meantime, e.g when bulk uploading.+ container.attachments.reload+ endendend- end- def after_perform(call)- attachment = call.result- container = attachment.container+ def after_perform(call)+ attachment = call.result+ container = attachment.container- touch(container) unless container.nil?+ touch(container) unless container.nil?- OpenProject::Notifications.send(- OpenProject::Events::ATTACHMENT_CREATED,- attachment: attachment- )+ OpenProject::Notifications.send(+ OpenProject::Events::ATTACHMENT_CREATED,+ attachment: attachment+ )- call- end+ call+ end- def error_wrapped_call- yield- rescue StandardError => e- log_attachment_saving_error(e)+ def error_wrapped_call+ yield+ rescue StandardError => e+ log_attachment_saving_error(e)- message =- if e&.class&.to_s == 'Errno::EACCES'- I18n.t('api_v3.errors.unable_to_create_attachment_permissions')- else- I18n.t('api_v3.errors.unable_to_create_attachment')- end- raise message- end+ message =+ if e&.class&.to_s == 'Errno::EACCES'+ I18n.t('api_v3.errors.unable_to_create_attachment_permissions')+ else+ I18n.t('api_v3.errors.unable_to_create_attachment')+ end+ raise message+ end- def log_attachment_saving_error(error)- message = "Failed to save attachment: #{error&.class} - #{error&.message || 'Unknown error'}"+ def log_attachment_saving_error(error)+ message = "Failed to save attachment: #{error&.class} - #{error&.message || 'Unknown error'}"- OpenProject.logger.error message+ OpenProject.logger.error message+ endendenddiff --cc frontend/package.jsonindex f421b40c7e1,94953e349f9..c2b2145c754--- a/frontend/package.json+++ b/frontend/package.json@@@ -88,9 -71,9 +88,9 @@@"@uirouter/core": "^6.0.7","@uirouter/rx": "^0.6.5","@w11k/ngx-componentdestroyed": "^5.0.2",- "@xeokit/xeokit-bim-viewer": "2.3.0-alpha.4",+ "@xeokit/xeokit-bim-viewer": "2.3.6","autoprefixer": "^9.6.1",- "browserslist": "^4.9.1",+ "byte-base64": "^1.1.0","cdk-drag-scroll": "^0.0.6","chart.js": "2.9.4","chartjs-plugin-datalabels": "^0.6.0",diff --cc frontend/src/app/features/bim/ifc_models/ifc-viewer/ifc-viewer.component.tsindex 09050c9a52e,a0a8dd192fa..ea6fe13aa57--- a/frontend/src/app/features/bim/ifc_models/ifc-viewer/ifc-viewer.component.ts+++ b/frontend/src/app/features/bim/ifc_models/ifc-viewer/ifc-viewer.component.ts@@@ -35,11 -35,12 +35,12 @@@ importOnInit,ViewChild,} from '@angular/core';-import { IFCViewerService } from 'core-app/modules/bim/ifc_models/ifc-viewer/ifc-viewer.service';-import { IfcModelsDataService } from 'core-app/modules/bim/ifc_models/pages/viewer/ifc-models-data.service';-import { I18nService } from 'core-app/modules/common/i18n/i18n.service';-import { CurrentUserService } from 'core-app/modules/current-user/current-user.service';-import { CurrentProjectService } from 'core-app/components/projects/current-project.service';-import { BehaviorSubject } from "rxjs";+import { IFCViewerService } from 'core-app/features/bim/ifc_models/ifc-viewer/ifc-viewer.service';+import { IfcModelsDataService } from 'core-app/features/bim/ifc_models/pages/viewer/ifc-models-data.service';+import { I18nService } from 'core-app/core/i18n/i18n.service';+import { CurrentUserService } from 'core-app/core/current-user/current-user.service';+import { CurrentProjectService } from 'core-app/core/current-project/current-project.service';++import { BehaviorSubject } from 'rxjs';@Component({selector: 'ifc-viewer',diff --cc modules/bim/spec/support/pages/ifc_models/show_default.rbindex 3ec4f0a9259,9df65a6a0fd..f85cd900ad6--- a/modules/bim/spec/support/pages/ifc_models/show_default.rb+++ b/modules/bim/spec/support/pages/ifc_models/show_default.rb@@@ -62,12 -62,12 +62,12 @@@ module Pageselector = '.xeokit-btn'if visible- within ('[data-qa-selector="op-ifc-viewer--toolbar-container"]') do- within ('.op-ifc-viewer--toolbar') do++ within ('[data-qa-selector="op-ifc-viewer--toolbar"]') doexpect(page).to have_selector(selector, count: 9)endelseexpect(page).to have_no_selector(selector)- expect(page).to have_no_selector('[data-qa-selector="op-ifc-viewer--toolbar-container"]')- expect(page).to have_no_selector('.op-ifc-viewer--toolbar')++ expect(page).to have_no_selector('[data-qa-selector="op-ifc-viewer--toolbar"]')endend