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

reloading parent item after child has been removed

ulferts1bd777fa7da4
diff --git a/app/controllers/admin/custom_fields/hierarchy/items_controller.rb b/app/controllers/admin/custom_fields/hierarchy/items_controller.rb
index 731de1b0c88..ae67c1e363b 100644
--- a/app/controllers/admin/custom_fields/hierarchy/items_controller.rb
+++ b/app/controllers/admin/custom_fields/hierarchy/items_controller.rb
@@ -103,7 +103,7 @@ module Admin
item_service
.delete_branch(item: @active_item)
.either(
- ->(_) { update_via_turbo_stream(component: ItemsComponent.new(item: @active_item.parent)) },
+ ->(_) { update_via_turbo_stream(component: ItemsComponent.new(item: @active_item.parent.reload)) },
->(errors) { render_error_flash_message_via_turbo_stream(message: errors.full_messages) }
)