]> source.dussan.org Git - redmine.git/commitdiff
Merged r17237 from trunk to 3.3-stable (#28393).
authorGo MAEDA <maeda@farend.jp>
Sun, 25 Mar 2018 09:53:15 +0000 (09:53 +0000)
committerGo MAEDA <maeda@farend.jp>
Sun, 25 Mar 2018 09:53:15 +0000 (09:53 +0000)
Patch by Gregor Schmidt.

git-svn-id: http://svn.redmine.org/redmine/branches/3.3-stable@17239 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/controllers/trackers_controller.rb
app/views/trackers/_form.html.erb

index 2b93753d008a317d1d47a21f74cd50bebd86070f..5401bae653da971e1911a92dee4443af8849751d 100644 (file)
@@ -102,6 +102,6 @@ class TrackersController < ApplicationController
       return
     end
     @trackers = Tracker.sorted.to_a
-    @custom_fields = IssueCustomField.all.sort
+    @custom_fields = IssueCustomField.sorted
   end
 end
index 7b5b7ea61a8d7641ed7412975067a08155706d15..3d71d769476886a9e03d357707f7bbd6c4520d63 100644 (file)
 </p>
 <%= hidden_field_tag 'tracker[core_fields][]', '' %>
 
-<% if IssueCustomField.all.any? %>
+<% @issue_custom_fields = IssueCustomField.sorted %>
+<% if @issue_custom_fields.present? %>
 <p>
   <label><%= l(:label_custom_field_plural) %></label>
-  <% IssueCustomField.all.each do |field| %>
+  <% @issue_custom_fields.each do |field| %>
     <label class="block">
       <%= check_box_tag 'tracker[custom_field_ids][]',field.id, @tracker.custom_fields.to_a.include?(field), :id => nil %>
       <%= field.name %>