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
[#41530] start and passing over to frank
Eric Schubert7c925a8eb18a
diff --git a/app/services/projects/copy_service.rb b/app/services/projects/copy_service.rbindex f8fe8acdcd8..2f9a5cae232 100644--- a/app/services/projects/copy_service.rb+++ b/app/services/projects/copy_service.rb@@ -42,7 +42,9 @@ module Projects::Projects::Copy::ForumsDependentService,::Projects::Copy::QueriesDependentService,::Projects::Copy::BoardsDependentService,- ::Projects::Copy::OverviewDependentService+ ::Projects::Copy::OverviewDependentService,+ ::Projects::Copy::StoragesDependentService,+ ::Projects::Copy::FileLinksDependentService]enddiff --git a/config/locales/en.yml b/config/locales/en.ymlindex c65bf00e0ed..24ccbab9e41 100644--- a/config/locales/en.yml+++ b/config/locales/en.yml@@ -1829,6 +1829,7 @@ en:label_project_new: "New project"label_project_plural: "Projects"label_project_settings: "Project settings"+ label_project_storage_plural: "Project storages"label_projects_storage_information: "%{count} projects using %{storage} disk storage"label_project_view_all: "View all projects"label_project_show_details: "Show project details"@@ -1980,6 +1981,7 @@ en:label_wiki_start: "Start page"label_work_package: "Work package"label_work_package_attachments: "Work package attachments"+ label_work_package_file_link_plural: "Work package file links"label_work_package_category_new: "New category"label_work_package_category_plural: "Work package categories"label_work_package_hierarchy: "Work package hierarchy"diff --git a/modules/storages/app/services/projects/copy/file_links_dependent_service.rb b/modules/storages/app/services/projects/copy/file_links_dependent_service.rbnew file mode 100644index 00000000000..7208cac51f9--- /dev/null+++ b/modules/storages/app/services/projects/copy/file_links_dependent_service.rb@@ -0,0 +1,40 @@+#-- copyright+# OpenProject is an open source project management software.+# Copyright (C) 2012-2022 the OpenProject GmbH+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License version 3.+#+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:+# Copyright (C) 2006-2013 Jean-Philippe Lang+# Copyright (C) 2010-2013 the ChiliProject Team+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License+# as published by the Free Software Foundation; either version 2+# of the License, or (at your option) any later version.+#+# This program is distributed in the hope that it will be useful,+# but WITHOUT ANY WARRANTY; without even the implied warranty of+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+# GNU General Public License for more details.+#+# You should have received a copy of the GNU General Public License+# along with this program; if not, write to the Free Software+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.+#+# See COPYRIGHT and LICENSE files for more details.+#++++module Projects::Copy+ class FileLinksDependentService < ::Copy::Dependency+ def self.human_name+ I18n.t(:label_work_package_file_link_plural)+ end++ def source_count+ source.storages.count+ end+ end+end+diff --git a/modules/storages/app/services/projects/copy/storages_dependent_service.rb b/modules/storages/app/services/projects/copy/storages_dependent_service.rbnew file mode 100644index 00000000000..6d72767dafc--- /dev/null+++ b/modules/storages/app/services/projects/copy/storages_dependent_service.rb@@ -0,0 +1,48 @@+#-- copyright+# OpenProject is an open source project management software.+# Copyright (C) 2012-2022 the OpenProject GmbH+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License version 3.+#+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:+# Copyright (C) 2006-2013 Jean-Philippe Lang+# Copyright (C) 2010-2013 the ChiliProject Team+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License+# as published by the Free Software Foundation; either version 2+# of the License, or (at your option) any later version.+#+# This program is distributed in the hope that it will be useful,+# but WITHOUT ANY WARRANTY; without even the implied warranty of+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+# GNU General Public License for more details.+#+# You should have received a copy of the GNU General Public License+# along with this program; if not, write to the Free Software+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.+#+# See COPYRIGHT and LICENSE files for more details.+#++++module Projects::Copy+ class StoragesDependentService < ::Copy::Dependency+ def self.human_name+ I18n.t(:label_project_storage_plural)+ end++ def source_count+ source.storages.count+ end++ protected++ def copy_dependency(params:)+ puts "STORAGES LOG"+ puts params+ puts state+ puts source.storages+ end+ end+end