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

Ensure we load the project to get the correct identifiers

Oliver Güntherf999370e5ba5
diff --git a/modules/meeting/app/controllers/meetings_controller.rb b/modules/meeting/app/controllers/meetings_controller.rb
index c0dacc61a6e..f58beebe0c6 100644
--- a/modules/meeting/app/controllers/meetings_controller.rb
+++ b/modules/meeting/app/controllers/meetings_controller.rb
@@ -168,6 +168,7 @@ class MeetingsController < ApplicationController
format.turbo_stream do
respond_with_dialog Meetings::Index::DialogComponent.new(
meeting: @meeting,
+ project: @project,
copy_from:
)
end
diff --git a/modules/meeting/app/menus/meetings/menu.rb b/modules/meeting/app/menus/meetings/menu.rb
index 43bb2de72de..a1cdc930334 100644
--- a/modules/meeting/app/menus/meetings/menu.rb
+++ b/modules/meeting/app/menus/meetings/menu.rb
@@ -64,9 +64,10 @@ module Meetings
query_params: { filters: all_filter })
end
- def meeting_series_menu_items
+ def meeting_series_menu_items # rubocop:disable Metrics/AbcSize
series = RecurringMeeting
.visible
+ .includes(:project)
.reorder("LOWER(title)")
if project
@@ -76,10 +77,9 @@ module Meetings
current_href = params[:current_href]
current_recurring_meeting_id = extracted_id(current_href)
- series.pluck(:id, :project_id, :title)
- .map do |id, project_id, title|
- href = project_recurring_meeting_path(project_id, id:)
- OpenProject::Menu::MenuItem.new(title:,
+ series.all.map do |series|
+ href = project_recurring_meeting_path(series.project, series)
+ OpenProject::Menu::MenuItem.new(title: series.title,
selected: select_status(href, current_href, current_recurring_meeting_id),
href:)
end