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
show project count in index
Ivan Kuchinc676588d4da0
diff --git a/app/components/settings/project_life_cycle_step_definitions/row_component.html.erb b/app/components/settings/project_life_cycle_step_definitions/row_component.html.erbindex 711efabbe01..4f75a969d91 100644--- a/app/components/settings/project_life_cycle_step_definitions/row_component.html.erb+++ b/app/components/settings/project_life_cycle_step_definitions/row_component.html.erb@@ -43,6 +43,9 @@ See COPYRIGHT and LICENSE files for more details.title_container.with_column(pt: 1) dorender(Projects::LifeCycleTypeComponent.new(definition))end+ title_container.with_column(pt: 1, ml: 3) do+ render(Primer::Beta::Text.new) { t("project.count", count: definition.project_count) }+ endendend%>diff --git a/app/controllers/admin/settings/project_life_cycle_step_definitions_controller.rb b/app/controllers/admin/settings/project_life_cycle_step_definitions_controller.rbindex 584804e477a..6afae30c38d 100644--- a/app/controllers/admin/settings/project_life_cycle_step_definitions_controller.rb+++ b/app/controllers/admin/settings/project_life_cycle_step_definitions_controller.rb@@ -80,7 +80,7 @@ module Admin::Settingsenddef find_definitions- @definitions = Project::LifeCycleStepDefinition.all+ @definitions = Project::LifeCycleStepDefinition.with_project_countenddef find_definitiondiff --git a/config/locales/en.yml b/config/locales/en.ymlindex 506099f83cd..16d48fbec46 100644--- a/config/locales/en.yml+++ b/config/locales/en.yml@@ -3348,9 +3348,9 @@ en:are_you_sure: "Are you sure you want to archive the project '%{name}'?"archived: "Archived"count:- zero: "0 Projects"- one: "1 Project"- other: "%{count} Projects"+ zero: "0 projects"+ one: "1 project"+ other: "%{count} projects"project_module_activity: "Activity"project_module_forums: "Forums"diff --git a/spec/features/admin/project_custom_fields/list_spec.rb b/spec/features/admin/project_custom_fields/list_spec.rbindex 8c337fe1238..1caf5186e60 100644--- a/spec/features/admin/project_custom_fields/list_spec.rb+++ b/spec/features/admin/project_custom_fields/list_spec.rb@@ -169,7 +169,7 @@ RSpec.describe "List project custom fields", :js doit "shows the number of projects using a custom field" dowithin_project_custom_field_container(boolean_project_custom_field) do- expect(page).to have_text("0 Projects")+ expect(page).to have_text("0 projects")endproject = create(:project)@@ -178,7 +178,7 @@ RSpec.describe "List project custom fields", :js dovisit admin_settings_project_custom_fields_pathwithin_project_custom_field_container(boolean_project_custom_field) do- expect(page).to have_text("1 Project")+ expect(page).to have_text("1 project")endend