From e6ee8d0ebebc217e247558507eac619931a47121 Mon Sep 17 00:00:00 2001 From: Dominik Sander Date: Thu, 30 Apr 2015 23:29:00 +0200 Subject: Group milestones by title in the dashboard and all other issue views This groups milestones by title for issue views like it has been done for the milestone dashboard/project overview. Before milestones with the same title would show up multiple times in the filter dropdown and one could only filter per project and milestone. Now the milestone filter is based on the title of the milestone, i.e. all issues marked with the same milestone title are shown. --- app/helpers/milestones_helper.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'app/helpers/milestones_helper.rb') diff --git a/app/helpers/milestones_helper.rb b/app/helpers/milestones_helper.rb index 282bdf744d2..93e33ebefd8 100644 --- a/app/helpers/milestones_helper.rb +++ b/app/helpers/milestones_helper.rb @@ -28,6 +28,7 @@ module MilestonesHelper Milestone.where(project_id: @projects) end.active - options_from_collection_for_select(milestones, 'id', 'title', params[:milestone_id]) + grouped_milestones = Milestones::GroupService.new(milestones).execute + options_from_collection_for_select(grouped_milestones, 'title', 'title', params[:milestone_title]) end end -- cgit v1.2.1