Skip to content

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

Capitalize some column names in wp table configuration dropdown

Christophe Bliard0acbd071a6d3
diff --git a/app/models/queries/work_packages/columns/relation_of_type_column.rb b/app/models/queries/work_packages/columns/relation_of_type_column.rb
index d9e1055e96c..41194ba9ec2 100644
--- a/app/models/queries/work_packages/columns/relation_of_type_column.rb
+++ b/app/models/queries/work_packages/columns/relation_of_type_column.rb
@@ -44,7 +44,7 @@ class Queries::WorkPackages::Columns::RelationOfTypeColumn < Queries::WorkPackag
def caption
I18n.t(:'activerecord.attributes.query.relations_of_type_column',
- type: I18n.t(type[:sym_name]))
+ type: I18n.t(type[:sym_name]).capitalize)
end
def self.instances(_context = nil)
diff --git a/spec/features/work_packages/table/relations_spec.rb b/spec/features/work_packages/table/relations_spec.rb
index 567b72dd8de..54e909a4649 100644
--- a/spec/features/work_packages/table/relations_spec.rb
+++ b/spec/features/work_packages/table/relations_spec.rb
@@ -51,7 +51,7 @@ RSpec.describe 'Work Package table relations', :js, with_ee: %i[work_package_que
wp_table.expect_work_package_listed(wp_from, wp_to, wp_to2)
columns.add(type.name, finicky: true)
- columns.add("follows", finicky: true)
+ columns.add("Follows", finicky: true)
wp_from_row = wp_table.row(wp_from)
wp_from_to = wp_table.row(wp_to)
diff --git a/spec/lib/api/v3/queries/columns/query_relation_of_type_column_representer_spec.rb b/spec/lib/api/v3/queries/columns/query_relation_of_type_column_representer_spec.rb
index 25e9ea080f8..766679eae98 100644
--- a/spec/lib/api/v3/queries/columns/query_relation_of_type_column_representer_spec.rb
+++ b/spec/lib/api/v3/queries/columns/query_relation_of_type_column_representer_spec.rb
@@ -42,7 +42,7 @@ RSpec.describe API::V3::Queries::Columns::QueryRelationOfTypeColumnRepresenter d
it_behaves_like 'has a titled link' do
let(:link) { 'self' }
let(:href) { api_v3_paths.query_column "relationsOfType#{type[:sym].to_s.camelcase}" }
- let(:title) { "#{I18n.t(type[:name])} relations" }
+ let(:title) { "#{I18n.t(type[:name]).capitalize} relations" }
end
end
@@ -66,7 +66,7 @@ RSpec.describe API::V3::Queries::Columns::QueryRelationOfTypeColumnRepresenter d
it 'has name attribute' do
expect(subject)
- .to be_json_eql("#{I18n.t(type[:name])} relations".to_json)
+ .to be_json_eql("#{I18n.t(type[:name]).capitalize} relations".to_json)
.at_path('name')
end
end