From 4455c099a7607585425fa4505d4b84cc4476ac71 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 18 Jun 2016 07:25:24 +0000 Subject: [PATCH] Merged r15548. git-svn-id: http://svn.redmine.org/redmine/branches/3.3-stable@15549 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/versions_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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?) -- 2.39.5