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
Update header only when items are not in a backlog
Mir Bhatiab03ec0c864ae
diff --git a/modules/meeting/app/controllers/concerns/meetings/agenda_component_streams.rb b/modules/meeting/app/controllers/concerns/meetings/agenda_component_streams.rbindex 5cdcf990a88..0753b0da31b 100644--- a/modules/meeting/app/controllers/concerns/meetings/agenda_component_streams.rb+++ b/modules/meeting/app/controllers/concerns/meetings/agenda_component_streams.rb@@ -274,7 +274,7 @@ module Meetingsmove_item_via_turbo_stream(meeting_agenda_item:)# Update the header for updated timestamp- update_header_component_via_turbo_stream+ update_header_component_via_turbo_stream unless @meeting_agenda_item.meeting_section.backlog?# update the displayed time slots of all other items in the sectionupdate_show_items_of_section_via_turbo_stream(meeting_section: meeting_agenda_item.meeting_section)diff --git a/modules/meeting/app/controllers/meeting_agenda_items_controller.rb b/modules/meeting/app/controllers/meeting_agenda_items_controller.rbindex 1ff96059ad5..d235decaf53 100644--- a/modules/meeting/app/controllers/meeting_agenda_items_controller.rb+++ b/modules/meeting/app/controllers/meeting_agenda_items_controller.rb@@ -91,14 +91,14 @@ class MeetingAgendaItemsController < ApplicationController@meeting_agenda_item = call.resultif call.success?- reset_meeting_from_agenda_item- # enable continue editing- update_header_component_via_turbo_stream- update_sidebar_details_component_via_turbo_streamif @meeting_agenda_item.meeting_section.backlog?update_section_via_turbo_stream(meeting_section: @meeting_agenda_item.meeting_section, collapsed: false)update_new_button_via_turbo_stream(disabled: false)else+ reset_meeting_from_agenda_item+ # enable continue editing+ update_header_component_via_turbo_stream+ update_sidebar_details_component_via_turbo_streamadd_item_via_turbo_stream(clear_slate: false)endelse@@ -129,17 +129,19 @@ class MeetingAgendaItemsController < ApplicationControllerrespond_with_turbo_streamsend- def update+ def update # rubocop:disable Metrics/AbcSizecall = ::MeetingAgendaItems::UpdateService.new(user: current_user, model: @meeting_agenda_item).call(meeting_agenda_item_params)if call.success?- reset_meeting_from_agenda_item+ unless @meeting_agenda_item.meeting_section.backlog?+ reset_meeting_from_agenda_item+ update_header_component_via_turbo_stream+ update_sidebar_details_component_via_turbo_stream+ endupdate_item_via_turbo_streamupdate_section_header_via_turbo_stream(meeting_section: @meeting_agenda_item.meeting_section)- update_header_component_via_turbo_stream- update_sidebar_details_component_via_turbo_streamelse# show errorsupdate_item_via_turbo_stream(state: :edit)@@ -157,12 +159,12 @@ class MeetingAgendaItemsController < ApplicationController.callif call.success?- reset_meeting_from_agenda_item- update_header_component_via_turbo_stream- update_sidebar_details_component_via_turbo_streamif section.backlog?update_section_via_turbo_stream(meeting_section: section, collapsed: false)else+ reset_meeting_from_agenda_item+ update_header_component_via_turbo_stream+ update_sidebar_details_component_via_turbo_streamremove_item_via_turbo_stream(clear_slate: @meeting.agenda_items.empty?)update_section_header_via_turbo_stream(meeting_section: section) if section&.reload.present?end