mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-26 10:21:14 +00:00
Preload issues custom values for bulk operations.
git-svn-id: http://svn.redmine.org/redmine/trunk@14730 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
c29727dd39
commit
4714b31002
@ -352,7 +352,10 @@ class ApplicationController < ActionController::Base
|
||||
# Find issues with a single :id param or :ids array param
|
||||
# Raises a Unauthorized exception if one of the issues is not visible
|
||||
def find_issues
|
||||
@issues = Issue.where(:id => (params[:id] || params[:ids])).preload(:project, :status, :tracker, :priority, :author, :assigned_to, :relations_to).to_a
|
||||
@issues = Issue.
|
||||
where(:id => (params[:id] || params[:ids])).
|
||||
preload(:project, :status, :tracker, :priority, :author, :assigned_to, :relations_to, {:custom_values => :custom_field}).
|
||||
to_a
|
||||
raise ActiveRecord::RecordNotFound if @issues.empty?
|
||||
raise Unauthorized unless @issues.all?(&:visible?)
|
||||
@projects = @issues.collect(&:project).compact.uniq
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user