diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-01-08 18:21:00 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-01-08 18:21:00 +0000 |
commit | 417219bfc49fd0d2ec725c27bbc57d960e8b699b (patch) | |
tree | 2246d6ac7127aee0c49825a7ae01f17f8b27057c /app | |
parent | 381319c4e8eae9afc849d7ee6011c24481d94b4c (diff) | |
download | redmine-417219bfc49fd0d2ec725c27bbc57d960e8b699b.tar.gz redmine-417219bfc49fd0d2ec725c27bbc57d960e8b699b.zip |
Fixed: error when displaying an issue with a query sorted by an association, eg. priority (#9936).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8569 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/issues_controller.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index 43ed6387e..8cd34d08e 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -328,7 +328,7 @@ private 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)) + issue_ids = @query.issue_ids(:order => sort_clause, :limit => (limit + 1), :include => [:assigned_to, :tracker, :priority, :category, :fixed_version]) if (idx = issue_ids.index(@issue.id)) && idx < limit @prev_issue_id = issue_ids[idx - 1] if idx > 0 @next_issue_id = issue_ids[idx + 1] if idx < (issue_ids.size - 1) |