]> source.dussan.org Git - redmine.git/commitdiff
Merged r15548.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 18 Jun 2016 07:25:24 +0000 (07:25 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 18 Jun 2016 07:25:24 +0000 (07:25 +0000)
git-svn-id: http://svn.redmine.org/redmine/branches/3.3-stable@15549 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/controllers/versions_controller.rb

index e52f4425b74246529aca0ca750ab6da55c668ae7..beb0f16a3b5cd0da1eeeb0bfa5134c36010f61f2 100644 (file)
@@ -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?)