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
[chore] render item shorts in value selector
Eric Schubertce1500cd468e
diff --git a/lib/api/v3/custom_fields/hierarchy/hierarchy_item_representer.rb b/lib/api/v3/custom_fields/hierarchy/hierarchy_item_representer.rbindex c978dd7993c..fc527c011e9 100644--- a/lib/api/v3/custom_fields/hierarchy/hierarchy_item_representer.rb+++ b/lib/api/v3/custom_fields/hierarchy/hierarchy_item_representer.rb@@ -36,7 +36,13 @@ module APIendself_link path: :custom_field_item,- title_getter: ->(*) { represented.label }+ title_getter: ->(*) do+ if represented.short.nil?+ represented.label+ else+ "#{represented.label} (#{represented.short})"+ end+ endproperty :iddiff --git a/spec/lib/api/v3/custom_fields/hierarchy/hierarchy_item_representer_rendering_spec.rb b/spec/lib/api/v3/custom_fields/hierarchy/hierarchy_item_representer_rendering_spec.rbindex 933145199a6..4a33d86b16e 100644--- a/spec/lib/api/v3/custom_fields/hierarchy/hierarchy_item_representer_rendering_spec.rb+++ b/spec/lib/api/v3/custom_fields/hierarchy/hierarchy_item_representer_rendering_spec.rb@@ -121,7 +121,7 @@ RSpec.describe API::V3::CustomFields::Hierarchy::HierarchyItemRepresenter, "rendit_behaves_like "has a titled link" dolet(:link) { "self" }let(:href) { api_v3_paths.custom_field_item(item.id) }- let(:title) { item.label }+ let(:title) { "#{item.label} (#{item.short})" }endit_behaves_like "has a titled link" do@@ -171,7 +171,7 @@ RSpec.describe API::V3::CustomFields::Hierarchy::HierarchyItemRepresenter, "rendit_behaves_like "has a titled link" dolet(:link) { "self" }let(:href) { api_v3_paths.custom_field_item(item.id) }- let(:title) { item.label }+ let(:title) { "#{item.label} (#{item.short})" }endit_behaves_like "has a titled link" do