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

fixed rendering after sorting update

Jonas Jabarice38f7680506
diff --git a/app/controllers/work_packages/activities_tab_controller.rb b/app/controllers/work_packages/activities_tab_controller.rb
index 986839f641b..307d1ab2f39 100644
--- a/app/controllers/work_packages/activities_tab_controller.rb
+++ b/app/controllers/work_packages/activities_tab_controller.rb
@@ -138,15 +138,10 @@ class WorkPackages::ActivitiesTabController < ApplicationController
)
if call.success?
- update_via_turbo_stream(
- component: WorkPackages::ActivitiesTab::Journals::FilterAndSortingComponent.new(
- work_package: @work_package,
- filter:
- )
- )
-
- update_via_turbo_stream(
- component: WorkPackages::ActivitiesTab::Journals::IndexComponent.new(
+ # update the whole tab to reflect the new sorting in all components
+ # we need to call replace in order to properly re-init the index stimulus component
+ replace_via_turbo_stream(
+ component: WorkPackages::ActivitiesTab::IndexComponent.new(
work_package: @work_package,
filter:
)