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

Merge pull request #17154 from opf/implementation/58524-render-full-branch-of-hierarchy-item-value-assignment

Eric Schubertb3bb0cb137b4
diff --cc lib/api/v3/custom_fields/hierarchy/item_branch_api.rb
index 823b092c195,16b946a88da..b5729d891d8
--- a/lib/api/v3/custom_fields/hierarchy/item_branch_api.rb
+++ b/lib/api/v3/custom_fields/hierarchy/item_branch_api.rb
@@@ -40,10 -40,9 +40,10 @@@ module AP
::CustomFields::Hierarchy::HierarchicalItemService
.new
.get_branch(item: @custom_field_item)
+ .fmap { |items| items.map { |item| HierarchicalItemAggregate.new(item:, depth: item.depth - 1) } }
.either(
->(items) do
- self_link = api_v3_paths.custom_field_item(@custom_field_item.id)
+ self_link = api_v3_paths.custom_field_item_branch(@custom_field_item.id)
HierarchyItemCollectionRepresenter.new(items, self_link:, current_user:)
end,
->(error) do