scope = Issue.visible.
joins(:status, :project).
+ preload(:priority).
where(statement).
includes(([:status, :project] + (options[:include] || [])).uniq).
where(options[:conditions]).
limit(options[:limit]).
offset(options[:offset])
- scope = scope.preload([:tracker, :priority, :author, :assigned_to, :fixed_version, :category] & columns.map(&:name))
+ scope = scope.preload([:tracker, :author, :assigned_to, :fixed_version, :category] & columns.map(&:name))
if has_custom_field_column?
scope = scope.preload(:custom_values)
end