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
[#64347] remove unnecessary calculated values controller
Tobias Dillmann399a233fa29f
diff --git a/app/controllers/admin/settings/project_custom_field_calculated_values_controller.rb b/app/controllers/admin/settings/project_custom_field_calculated_values_controller.rbdeleted file mode 100644index f862485a2d1..00000000000--- a/app/controllers/admin/settings/project_custom_field_calculated_values_controller.rb+++ /dev/null@@ -1,65 +0,0 @@-# frozen_string_literal: true--#-- copyright-# OpenProject is an open source project management software.-# Copyright (C) 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 Admin::Settings- class ProjectCustomFieldCalculatedValuesController < ::Admin::SettingsController- include CustomFields::SharedActions- include OpTurbo::ComponentStream- include FlashMessagesOutputSafetyHelper- include Admin::Settings::ProjectCustomFields::ComponentStreams-- before_action :check_feature_flag-- menu_item :project_custom_fields_settings-- def show- # quick fixing redirect issue from perform_update- # perform_update is always redirecting to the show action although configured otherwise- render :edit- end-- def new- @custom_field = ProjectCustomField.new(custom_field_section_id: params[:custom_field_section_id],- field_format: "calculated_value")-- respond_to :html- end-- def edit- @custom_field = ProjectCustomField.find_by(id: params[:id], field_format: "calculated_value")- end-- private-- def check_feature_flag- render_404 unless OpenProject::FeatureDecisions.calculated_value_project_attribute_active?- end- end-enddiff --git a/app/views/admin/settings/project_custom_field_calculated_values/edit.html.erb b/app/views/admin/settings/project_custom_field_calculated_values/edit.html.erbdeleted file mode 100644index 909df98646f..00000000000--- a/app/views/admin/settings/project_custom_field_calculated_values/edit.html.erb+++ /dev/null@@ -1,43 +0,0 @@-<%#-- copyright-OpenProject is an open source project management software.-Copyright (C) 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.--++#%>--<% html_title t(:label_administration), t("settings.project_attributes.heading"), @custom_field.name %>--<%=- render(- Settings::ProjectCustomFields::EditFormHeaderComponent.new(- custom_field: @custom_field,- selected: :project_custom_field_edit- )- )-%>--<%= error_messages_for "custom_field" %>--<%= render Admin::CustomFields::CalculatedValues::DetailsComponent.new(@custom_field) %>diff --git a/app/views/admin/settings/project_custom_field_calculated_values/new.html.erb b/app/views/admin/settings/project_custom_field_calculated_values/new.html.erbdeleted file mode 100644index 67d84e9a517..00000000000--- a/app/views/admin/settings/project_custom_field_calculated_values/new.html.erb+++ /dev/null@@ -1,36 +0,0 @@-<%#-- copyright-OpenProject is an open source project management software.-Copyright (C) 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.--++#%>--<% html_title t(:label_administration), t("settings.project_attributes.heading"), t("settings.project_attributes.new.heading") %>--<%= render(Settings::ProjectCustomFields::NewFormHeaderComponent.new) %>--<%= error_messages_for "custom_field" %>--<%= render Admin::CustomFields::CalculatedValues::DetailsComponent.new(@custom_field) %>diff --git a/config/routes.rb b/config/routes.rbindex fe2743311e1..363e9a1fe5a 100644--- a/config/routes.rb+++ b/config/routes.rb@@ -601,10 +601,6 @@ Rails.application.routes.draw dodelete :unlinkendend-- resources :project_custom_field_calculated_values,- controller: "/admin/settings/project_custom_field_calculated_values"-resources :project_custom_field_sections, controller: "/admin/settings/project_custom_field_sections",only: %i[create update destroy] domember do