diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2017-01-18 12:54:22 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2017-01-18 12:54:22 +0000 |
commit | aa354e62751670a1c2c6752cdfe9b8d6fb6c0bae (patch) | |
tree | 09bb080786454e4608871787765407e546221134 /app/controllers/issues_controller.rb | |
parent | 2c70d9e9886ebbd0924cd543f399788da9df21ca (diff) | |
download | redmine-aa354e62751670a1c2c6752cdfe9b8d6fb6c0bae.tar.gz redmine-aa354e62751670a1c2c6752cdfe9b8d6fb6c0bae.zip |
Don't join all associations by default (#24865).
git-svn-id: http://svn.redmine.org/redmine/trunk@16221 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/issues_controller.rb')
-rw-r--r-- | app/controllers/issues_controller.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index 3311d3e30..1b6a82aa4 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -66,8 +66,7 @@ class IssuesController < ApplicationController @issue_count = @query.issue_count @issue_pages = Paginator.new @issue_count, @limit, params['page'] @offset ||= @issue_pages.offset - @issues = @query.issues(:include => [:assigned_to, :tracker, :priority, :category, :fixed_version], - :order => sort_clause, + @issues = @query.issues(:order => sort_clause, :offset => @offset, :limit => @limit) @issue_count_by_group = @query.issue_count_by_group @@ -402,7 +401,7 @@ class IssuesController < ApplicationController sort_init(@query.sort_criteria.empty? ? [['id', 'desc']] : @query.sort_criteria) sort_update(@query.sortable_columns, 'issues_index_sort') 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)) if (idx = issue_ids.index(@issue.id)) && idx < limit if issue_ids.size < 500 @issue_position = idx + 1 |