From: Jean-Philippe Lang Date: Sat, 18 Jun 2016 07:25:24 +0000 (+0000) Subject: Merged r15548. X-Git-Tag: 3.3.0~16 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=4455c099a7607585425fa4505d4b84cc4476ac71;p=redmine.git Merged r15548. git-svn-id: http://svn.redmine.org/redmine/branches/3.3-stable@15549 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/controllers/versions_controller.rb b/app/controllers/versions_controller.rb index e52f4425b..beb0f16a3 100644 --- a/app/controllers/versions_controller.rb +++ b/app/controllers/versions_controller.rb @@ -36,8 +36,8 @@ class VersionsController < ApplicationController @with_subprojects = params[:with_subprojects].nil? ? Setting.display_subprojects_issues? : (params[:with_subprojects] == '1') project_ids = @with_subprojects ? @project.self_and_descendants.collect(&:id) : [@project.id] - @versions = @project.shared_versions || [] - @versions += @project.rolled_up_versions.visible if @with_subprojects + @versions = @project.shared_versions.preload(:custom_values) + @versions += @project.rolled_up_versions.visible.preload(:custom_values) if @with_subprojects @versions = @versions.uniq.sort unless params[:completed] @completed_versions = @versions.select(&:completed?)