Sort changesets by close time to match selection
This ensures that the sort can be optimised using the index when selecting by time.
This commit is contained in:
parent
f059045848
commit
702c071e19
1 changed files with 2 additions and 2 deletions
|
@ -172,9 +172,9 @@ module Api
|
|||
|
||||
# sort the changesets
|
||||
changesets = if params[:order] == "oldest"
|
||||
changesets.order("created_at ASC")
|
||||
changesets.order(:closed_at => :asc)
|
||||
else
|
||||
changesets.order("created_at DESC")
|
||||
changesets.order(:closed_at => :desc)
|
||||
end
|
||||
|
||||
# limit the result
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue