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
move lifecycle into life_cycle_steps namespace
ulferts39666a5ef461
diff --git a/app/components/projects/settings/life_cycles/index_component.html.erb b/app/components/projects/settings/life_cycle_steps/index_component.html.erbsimilarity index 94%rename from app/components/projects/settings/life_cycles/index_component.html.erbrename to app/components/projects/settings/life_cycle_steps/index_component.html.erbindex da00e1047a3..8353dfb82ac 100644--- a/app/components/projects/settings/life_cycles/index_component.html.erb+++ b/app/components/projects/settings/life_cycle_steps/index_component.html.erb@@ -34,7 +34,7 @@actions_container.with_column(data: { 'projects--settings--border-box-filter-target': 'bulkActionContainer' }) dorender(Primer::Beta::Button.new(tag: :a,- href: enable_all_project_settings_life_cycle_path(project_id: project),+ href: enable_all_project_settings_life_cycle_steps_path(project_id: project),scheme: :invisible,font_weight: :bold,color: :subtle,@@ -48,7 +48,7 @@actions_container.with_column(data: { 'projects--settings--border-box-filter-target': 'bulkActionContainer' }) dorender(Primer::Beta::Button.new(tag: :a,- href: disable_all_project_settings_life_cycle_path(project_id: project),+ href: disable_all_project_settings_life_cycle_steps_path(project_id: project),scheme: :invisible,font_weight: :bold,color: :subtle,@@ -70,7 +70,7 @@life_cycle_definitions.each do |definition|component.with_row(data: { 'projects--settings--border-box-filter-target': 'searchItem' },test_selector: "project-life-cycle-step-#{definition.id}") do- render(Projects::Settings::LifeCycles::StepComponent.new(project:, definition:))+ render(Projects::Settings::LifeCycleSteps::StepComponent.new(project:, definition:))endendenddiff --git a/app/components/projects/settings/life_cycles/index_component.rb b/app/components/projects/settings/life_cycle_steps/index_component.rbsimilarity index 98%rename from app/components/projects/settings/life_cycles/index_component.rbrename to app/components/projects/settings/life_cycle_steps/index_component.rbindex 403c2615262..0e97dd685b8 100644--- a/app/components/projects/settings/life_cycles/index_component.rb+++ b/app/components/projects/settings/life_cycle_steps/index_component.rb@@ -28,7 +28,7 @@module Projectsmodule Settings- module LifeCycles+ module LifeCycleStepsclass IndexComponent < ApplicationComponentinclude ApplicationHelperinclude OpPrimer::ComponentHelpersdiff --git a/app/components/projects/settings/life_cycles/show_page_header_component.html.erb b/app/components/projects/settings/life_cycle_steps/show_page_header_component.html.erbsimilarity index 100%rename from app/components/projects/settings/life_cycles/show_page_header_component.html.erbrename to app/components/projects/settings/life_cycle_steps/show_page_header_component.html.erbdiff --git a/app/components/projects/settings/life_cycles/show_page_header_component.rb b/app/components/projects/settings/life_cycle_steps/show_page_header_component.rbsimilarity index 97%rename from app/components/projects/settings/life_cycles/show_page_header_component.rbrename to app/components/projects/settings/life_cycle_steps/show_page_header_component.rbindex 9641ab894d4..7aebeae941d 100644--- a/app/components/projects/settings/life_cycles/show_page_header_component.rb+++ b/app/components/projects/settings/life_cycle_steps/show_page_header_component.rb@@ -28,7 +28,7 @@# See COPYRIGHT and LICENSE files for more details.# ++-module Projects::Settings::LifeCycles+module Projects::Settings::LifeCycleStepsclass ShowPageHeaderComponent < ApplicationComponentinclude ApplicationHelperdiff --git a/app/components/projects/settings/life_cycles/step_component.html.erb b/app/components/projects/settings/life_cycle_steps/step_component.html.erbsimilarity index 94%rename from app/components/projects/settings/life_cycles/step_component.html.erbrename to app/components/projects/settings/life_cycle_steps/step_component.html.erbindex d8bf4ebdd55..e60d9f19aeb 100644--- a/app/components/projects/settings/life_cycles/step_component.html.erb+++ b/app/components/projects/settings/life_cycle_steps/step_component.html.erb@@ -16,7 +16,7 @@# behavior can be seen on primer's viewbook as well -> https://view-components-storybook.eastus.cloudapp.azure.com/view-components/lookbook/inspect/primer/alpha/toggle_switch/small# quick fix: don't display loading indicator which is causing the bouncerender(Primer::Alpha::ToggleSwitch.new(- src: toggle_project_settings_life_cycle_path(definition_id: definition.id),+ src: toggle_project_settings_life_cycle_step_path(id: definition.id),csrf_token: form_authenticity_token,data: { test_selector: "toggle-project-life-cycle-#{definition.id}" },aria: { label: toggle_aria_label },diff --git a/app/components/projects/settings/life_cycles/step_component.rb b/app/components/projects/settings/life_cycle_steps/step_component.rbsimilarity index 98%rename from app/components/projects/settings/life_cycles/step_component.rbrename to app/components/projects/settings/life_cycle_steps/step_component.rbindex 3f32e3d5c24..92de227324f 100644--- a/app/components/projects/settings/life_cycles/step_component.rb+++ b/app/components/projects/settings/life_cycle_steps/step_component.rb@@ -28,7 +28,7 @@module Projectsmodule Settings- module LifeCycles+ module LifeCycleStepsclass StepComponent < ApplicationComponentinclude ApplicationHelperinclude OpPrimer::ComponentHelpersdiff --git a/app/controllers/projects/settings/life_cycles_controller.rb b/app/controllers/projects/settings/life_cycle_steps_controller.rbsimilarity index 88%rename from app/controllers/projects/settings/life_cycles_controller.rbrename to app/controllers/projects/settings/life_cycle_steps_controller.rbindex c8f85edd0e8..c28a3b12ab9 100644--- a/app/controllers/projects/settings/life_cycles_controller.rb+++ b/app/controllers/projects/settings/life_cycle_steps_controller.rb@@ -26,19 +26,19 @@# See COPYRIGHT and LICENSE files for more details.# ++-class Projects::Settings::LifeCyclesController < Projects::SettingsController+class Projects::Settings::LifeCycleStepsController < Projects::SettingsControllerinclude OpTurbo::ComponentStreambefore_action :deny_access_on_feature_flag- before_action :load_life_cycle_definitions, only: %i[show enable_all disable_all]+ before_action :load_life_cycle_definitions, only: %i[index enable_all disable_all]- menu_item :settings_life_cycles+ menu_item :settings_life_cycle_steps- def show; end+ def index; enddef toggle- definition = Project::LifeCycleStepDefinition.where(id: params[:definition_id])+ definition = Project::LifeCycleStepDefinition.where(id: params[:id])upsert_steps(definition, active: params["value"])end@@ -46,13 +46,13 @@ class Projects::Settings::LifeCyclesController < Projects::SettingsControllerdef disable_allupsert_steps(@life_cycle_definitions, active: false)- redirect_to action: :show+ redirect_to action: :indexenddef enable_allupsert_steps(@life_cycle_definitions, active: true)- redirect_to action: :show+ redirect_to action: :indexendprivatediff --git a/app/views/projects/settings/life_cycles/show.html.erb b/app/views/projects/settings/life_cycle_steps/index.html.erbsimilarity index 79%rename from app/views/projects/settings/life_cycles/show.html.erbrename to app/views/projects/settings/life_cycle_steps/index.html.erbindex dcca60890c1..1fd3cc4337c 100644--- a/app/views/projects/settings/life_cycles/show.html.erb+++ b/app/views/projects/settings/life_cycle_steps/index.html.erb@@ -27,7 +27,7 @@ See COPYRIGHT and LICENSE files for more details.++#%>-<%= render(Projects::Settings::LifeCycles::ShowPageHeaderComponent.new(project: @project)) %>+<%= render(Projects::Settings::LifeCycleSteps::ShowPageHeaderComponent.new(project: @project)) %>-<%= render(Projects::Settings::LifeCycles::IndexComponent.new(project: @project,- life_cycle_definitions: @life_cycle_definitions)) %>+<%= render(Projects::Settings::LifeCycleSteps::IndexComponent.new(project: @project,+ life_cycle_definitions: @life_cycle_definitions)) %>diff --git a/config/initializers/menus.rb b/config/initializers/menus.rbindex 6131ab47b6e..da3a44c8978 100644--- a/config/initializers/menus.rb+++ b/config/initializers/menus.rb@@ -625,7 +625,11 @@ Redmine::MenuManager.map :project_menu do |menu|project_menu_items = {general: { caption: :label_information_plural },- life_cycles: { caption: :label_life_cycle_plural, if: ->(*) { OpenProject::FeatureDecisions.stages_and_gates_active? } },+ life_cycle_steps: {+ caption: :label_life_cycle_step_plural,+ action: :index,+ if: ->(*) { OpenProject::FeatureDecisions.stages_and_gates_active? }+ },project_custom_fields: { caption: :label_project_attributes_plural },modules: { caption: :label_module_plural },types: { caption: :label_work_package_types },@@ -639,9 +643,9 @@ Redmine::MenuManager.map :project_menu do |menu|project_menu_items.each do |key, options|menu.push :"settings_#{key}",- { controller: "/projects/settings/#{key}", action: "show" },+ { controller: "/projects/settings/#{key}", action: "show" }.merge(options.slice(:action)),parent: :settings,- **options+ **options.except(:action)endenddiff --git a/config/initializers/permissions.rb b/config/initializers/permissions.rbindex 89baf66fdd9..d0ed1a2f597 100644--- a/config/initializers/permissions.rb+++ b/config/initializers/permissions.rb@@ -135,7 +135,7 @@ Rails.application.reloader.to_prepare domap.permission :select_project_life_cycle,{- "projects/settings/life_cycles": %i[show toggle enable_all disable_all]+ "projects/settings/life_cycle_steps": %i[index toggle enable_all disable_all]},permissible_on: :project,require: :member,diff --git a/config/locales/en.yml b/config/locales/en.ymlindex a57949e0c33..e1be26ca815 100644--- a/config/locales/en.yml+++ b/config/locales/en.yml@@ -2592,7 +2592,7 @@ en:label_none_parentheses: "(none)"label_not_contains: "doesn't contain"label_not_equals: "is not"- label_life_cycle_plural: "Project lifecycle"+ label_life_cycle_step_plural: "Project lifecycle"label_on: "on"label_operator_all: "is not empty"label_operator_none: "is empty"diff --git a/config/routes.rb b/config/routes.rbindex a038a5ded35..5dd529cc78d 100644--- a/config/routes.rb+++ b/config/routes.rb@@ -244,7 +244,7 @@ Rails.application.routes.draw doput :disable_all_of_sectionendend- resource :life_cycle, only: %i[show] do+ resources :life_cycle_steps, only: %i[index], path: "life_cycle" domember dopost :toggleend