Commit 2eb76186 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge pull request #5158 from tkoenig/fix-active-milestone-order

Sort active milestones by due date (upcoming first)
parents 3db47d12 5fba1d95
...@@ -14,7 +14,7 @@ class Projects::MilestonesController < Projects::ApplicationController ...@@ -14,7 +14,7 @@ class Projects::MilestonesController < Projects::ApplicationController
@milestones = case params[:f] @milestones = case params[:f]
when 'all'; @project.milestones.order("state, due_date DESC") when 'all'; @project.milestones.order("state, due_date DESC")
when 'closed'; @project.milestones.closed.order("due_date DESC") when 'closed'; @project.milestones.closed.order("due_date DESC")
else @project.milestones.active.order("due_date DESC") else @project.milestones.active.order("due_date ASC")
end end
@milestones = @milestones.includes(:project) @milestones = @milestones.includes(:project)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment