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
[#57608] Removal dialog shows storage type instead of storage name (#16604)
Kabiru Mwenja3fdae9c3cc01
diff --git a/modules/storages/app/components/storages/project_storages/destroy_confirmation_dialog_component.rb b/modules/storages/app/components/storages/project_storages/destroy_confirmation_dialog_component.rbindex 47fc7a353bf..228e6125fb4 100644--- a/modules/storages/app/components/storages/project_storages/destroy_confirmation_dialog_component.rb+++ b/modules/storages/app/components/storages/project_storages/destroy_confirmation_dialog_component.rb@@ -44,8 +44,7 @@ module Storages::ProjectStoragesenddef heading- I18n.t("project_storages.remove_project.dialog.heading",- storage_type: I18n.t("storages.provider_types.#{@storage.short_provider_type}.name"))+ I18n.t("project_storages.remove_project.dialog.heading_text", storage: @storage.name)enddef textdiff --git a/modules/storages/config/locales/en.yml b/modules/storages/config/locales/en.ymlindex ab7997b38ca..4fdb9f4fe6e 100644--- a/modules/storages/config/locales/en.yml+++ b/modules/storages/config/locales/en.yml@@ -71,7 +71,7 @@ en:dialog:automatically_managed_appendix: Also, in this case this storage has an automatically managed project folder, this and its files will be deleted forever.confirmation_text: Please, confirm you understand and want to remove this file storage from this project- heading: Remove project from %{storage_type}+ heading_text: Remove project from %{storage}text: This action is irreversible and will remove all links from work packages of this project to files and folders of that storage.label: Remove projectservices:diff --git a/modules/storages/spec/components/storages/project_storages/destroy_confirmation_dialog_component_spec.rb b/modules/storages/spec/components/storages/project_storages/destroy_confirmation_dialog_component_spec.rbindex f96cd89d78e..fef345bc0d4 100644--- a/modules/storages/spec/components/storages/project_storages/destroy_confirmation_dialog_component_spec.rb+++ b/modules/storages/spec/components/storages/project_storages/destroy_confirmation_dialog_component_spec.rb@@ -32,13 +32,12 @@ require_module_spec_helperRSpec.describe Storages::ProjectStorages::DestroyConfirmationDialogComponent,type: :component dodescribe "#heading" do- it "contains the storage type" do+ it "contains the storage name" dostorage = build_stubbed(:one_drive_storage)project_storage = build_stubbed(:project_storage, storage:)component = described_class.new(storage:, project_storage:)- expect(component.heading).to include("OneDrive/SharePoint")- expect(component.heading).not_to include("Nextcloud")+ expect(component.heading).to include(storage.name)endenddiff --git a/modules/storages/spec/features/storages/admin/project_storages_spec.rb b/modules/storages/spec/features/storages/admin/project_storages_spec.rbindex 3c5759eb6c4..dd97a3b5b9a 100644--- a/modules/storages/spec/features/storages/admin/project_storages_spec.rb+++ b/modules/storages/spec/features/storages/admin/project_storages_spec.rb@@ -355,7 +355,7 @@ RSpec.describe "Admin lists project mappings for a storage",project_storages_index_page.click_menu_item_of("Remove project", project)page.within("dialog") do- expect(page).to have_text("Remove project from Nextcloud")+ expect(page).to have_text("Remove project from #{storage.name}")expect(page).to have_text("this storage has an automatically managed project folder")click_on "Close"end