#2037 issue列表默认显示顺序改为最后更新的倒序
This commit is contained in:
parent
366fbcd4d4
commit
f3d6d7c384
|
@ -58,7 +58,7 @@ class IssuesController < ApplicationController
|
||||||
|
|
||||||
def index
|
def index
|
||||||
retrieve_query
|
retrieve_query
|
||||||
sort_init(@query.sort_criteria.empty? ? [['id', 'desc']] : @query.sort_criteria)
|
sort_init(@query.sort_criteria.empty? ? [['updated_on', 'desc']] : @query.sort_criteria)
|
||||||
sort_update(@query.sortable_columns)
|
sort_update(@query.sortable_columns)
|
||||||
@query.sort_criteria = sort_criteria.to_a
|
@query.sort_criteria = sort_criteria.to_a
|
||||||
|
|
||||||
|
@ -381,7 +381,7 @@ class IssuesController < ApplicationController
|
||||||
def retrieve_previous_and_next_issue_ids
|
def retrieve_previous_and_next_issue_ids
|
||||||
retrieve_query_from_session
|
retrieve_query_from_session
|
||||||
if @query
|
if @query
|
||||||
sort_init(@query.sort_criteria.empty? ? [['id', 'desc']] : @query.sort_criteria)
|
sort_init(@query.sort_criteria.empty? ? [['updated_on', 'desc']] : @query.sort_criteria)
|
||||||
sort_update(@query.sortable_columns, 'issues_index_sort')
|
sort_update(@query.sortable_columns, 'issues_index_sort')
|
||||||
limit = 500
|
limit = 500
|
||||||
issue_ids = @query.issue_ids(:order => sort_clause, :limit => (limit + 1), :include => [:assigned_to, :tracker, :priority, :category, :fixed_version])
|
issue_ids = @query.issue_ids(:order => sort_clause, :limit => (limit + 1), :include => [:assigned_to, :tracker, :priority, :category, :fixed_version])
|
||||||
|
|
Loading…
Reference in New Issue