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
Reload meeting from section similar to agenda
Oliver Güntherd12a558610f9
diff --git a/modules/meeting/app/controllers/meeting_agenda_items_controller.rb b/modules/meeting/app/controllers/meeting_agenda_items_controller.rbindex 1843d1e0acd..3c60d8a7606 100644--- a/modules/meeting/app/controllers/meeting_agenda_items_controller.rb+++ b/modules/meeting/app/controllers/meeting_agenda_items_controller.rb@@ -81,7 +81,7 @@ class MeetingAgendaItemsController < ApplicationController@meeting_agenda_item = call.resultif call.success?- set_meeting_from_agenda_item+ reset_meeting_from_agenda_item# enable continue editingadd_item_via_turbo_stream(clear_slate: false)update_header_component_via_turbo_stream@@ -120,7 +120,7 @@ class MeetingAgendaItemsController < ApplicationController.call(meeting_agenda_item_params)if call.success?- set_meeting_from_agenda_item+ reset_meeting_from_agenda_itemupdate_item_via_turbo_streamupdate_section_header_via_turbo_stream(meeting_section: @meeting_agenda_item.meeting_section)update_header_component_via_turbo_stream@@ -142,7 +142,7 @@ class MeetingAgendaItemsController < ApplicationController.callif call.success?- set_meeting_from_agenda_item+ reset_meeting_from_agenda_itemremove_item_via_turbo_stream(clear_slate: @meeting.agenda_items.empty?)update_header_component_via_turbo_streamupdate_section_header_via_turbo_stream(meeting_section: section) if section&.reload.present?@@ -202,7 +202,7 @@ class MeetingAgendaItemsController < ApplicationController# In case we updated the meeting as part of the service flow# it needs to be reassigned for the controller in order to get correct timestamps- def set_meeting_from_agenda_item+ def reset_meeting_from_agenda_item@meeting = @meeting_agenda_item.meetingenddiff --git a/modules/meeting/app/controllers/meeting_sections_controller.rb b/modules/meeting/app/controllers/meeting_sections_controller.rbindex 0b6a870cfa2..0d9b36f3be8 100644--- a/modules/meeting/app/controllers/meeting_sections_controller.rb+++ b/modules/meeting/app/controllers/meeting_sections_controller.rb@@ -49,6 +49,7 @@ class MeetingSectionsController < ApplicationController@meeting_section = call.resultif call.success?+ reset_meeting_from_agenda_sectionadd_section_via_turbo_streamupdate_section_via_turbo_stream(force_wrapper: true, state: :edit)# update the section header of the previously last section in order to ensure the action menu move options are updated@@ -90,6 +91,7 @@ class MeetingSectionsController < ApplicationController.call(meeting_section_params)if call.success?+ reset_meeting_from_agenda_sectionupdate_section_header_via_turbo_stream(state: :show)update_header_component_via_turbo_streamupdate_sidebar_details_component_via_turbo_stream@@ -109,6 +111,7 @@ class MeetingSectionsController < ApplicationController.callif call.success?+ reset_meeting_from_agenda_sectionremove_section_via_turbo_stream# in case the destroy action was called from the cancel_edit action# we need to update the new button state, which was disabled before@@ -171,6 +174,12 @@ class MeetingSectionsController < ApplicationController@project = @meeting.project # required for authorization via before_actionend+ # In case we updated the meeting as part of the service flow+ # it needs to be reassigned for the controller in order to get correct timestamps+ def reset_meeting_from_agenda_section+ @meeting = @meeting_section.meeting+ end+def set_agenda_item_type@agenda_item_type = params[:type]&.to_symend