Project milestones should be ordered by due_date like global milestones?
I think this issue is related with #1125 (closed) and !1934 (merged).
and it will be fixed by making changes like following.
app/controllers/projects/milestones_controller.rb
def index
@milestones = case params[:state]
- when 'all'; @project.milestones.order("state, due_date DESC")
- when 'closed'; @project.milestones.closed.order("due_date DESC")
- else @project.milestones.active.order("due_date ASC")
+ when 'all'; @project.milestones.reorder("state, due_date DESC")
+ when 'closed'; @project.milestones.closed.reorder("due_date DESC")
+ else @project.milestones.active.reorder("due_date ASC")
end
@milestones = @milestones.includes(:project)
@milestones = @milestones.page(params[:page]).per(PER_PAGE)
end