Fixed: bulk edit doesn't include global custom fields (#4505).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3277 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2010-01-03 10:50:40 +00:00
parent 4ac99328ff
commit e9810b5de6
3 changed files with 5 additions and 3 deletions

View File

@ -273,7 +273,7 @@ class IssuesController < ApplicationController
return
end
@available_statuses = Workflow.available_statuses(@project)
@custom_fields = @project.issue_custom_fields.select {|f| f.field_format == 'list'}
@custom_fields = @project.all_issue_custom_fields.select {|f| f.field_format == 'list'}
end
def move

View File

@ -46,7 +46,7 @@
</p>
<% @custom_fields.each do |custom_field| %>
<p><label><%= h(custom_field.name) %></label>
<p><label><%= h(custom_field.name) %>
<%= select_tag "custom_field_values[#{custom_field.id}]", options_for_select([[l(:label_no_change_option), '']] + custom_field.possible_values) %></label>
</p>
<% end %>
@ -60,5 +60,5 @@
</fieldset>
</div>
<p><%= submit_tag l(:button_submit) %>
<p><%= submit_tag l(:button_submit) %></p>
<% end %>

View File

@ -946,6 +946,8 @@ class IssuesControllerTest < ActionController::TestCase
get :bulk_edit, :ids => [1, 2]
assert_response :success
assert_template 'bulk_edit'
# System wide custom field
assert_tag :select, :attributes => {:name => 'custom_field_values[1]'}
end
def test_bulk_edit