diff options
author | Go MAEDA <maeda@farend.jp> | 2018-03-25 09:49:52 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2018-03-25 09:49:52 +0000 |
commit | c437d8db61d6014116f29e1c3b40e5ef311fcff3 (patch) | |
tree | 2b7ffc29e92af964862c8ce24c13e4f088c26504 /app/views/trackers | |
parent | 19bcaf28f8c8e3e06f860dffe64fc49e4cda581e (diff) | |
download | redmine-c437d8db61d6014116f29e1c3b40e5ef311fcff3.tar.gz redmine-c437d8db61d6014116f29e1c3b40e5ef311fcff3.zip |
Fix: Sort issue custom fields by position in tracker views (#28393).
Patch by Gregor Schmidt.
git-svn-id: http://svn.redmine.org/redmine/trunk@17237 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/trackers')
-rw-r--r-- | app/views/trackers/_form.html.erb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/views/trackers/_form.html.erb b/app/views/trackers/_form.html.erb index 7b5b7ea61..3d71d7694 100644 --- a/app/views/trackers/_form.html.erb +++ b/app/views/trackers/_form.html.erb @@ -21,10 +21,11 @@ </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 %> |