From: Jean-Philippe Lang Date: Sat, 9 Apr 2016 05:52:47 +0000 (+0000) Subject: Merged r15293 (#22305). X-Git-Tag: 3.1.5~3 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=fef26735514d48cb457d4e2c011724112abaf971;p=redmine.git Merged r15293 (#22305). git-svn-id: http://svn.redmine.org/redmine/branches/3.1-stable@15307 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/views/workflows/permissions.html.erb b/app/views/workflows/permissions.html.erb index 03740214d..032aa9d84 100644 --- a/app/views/workflows/permissions.html.erb +++ b/app/views/workflows/permissions.html.erb @@ -85,7 +85,7 @@ <%= field.name %> <%= content_tag('span', '*', :class => 'required') if field_required?(field) %> <% for status in @statuses -%> - + <%= field_permission_tag(@permissions, status, field, @roles) %> <% unless status == @statuses.last %>»<% end %> diff --git a/test/functional/workflows_controller_test.rb b/test/functional/workflows_controller_test.rb index d6d1cc820..21cbd40d9 100644 --- a/test/functional/workflows_controller_test.rb +++ b/test/functional/workflows_controller_test.rb @@ -260,10 +260,13 @@ class WorkflowsControllerTest < ActionController::TestCase def test_get_permissions_should_set_css_class WorkflowPermission.delete_all WorkflowPermission.create!(:role_id => 1, :tracker_id => 2, :old_status_id => 1, :field_name => 'assigned_to_id', :rule => 'required') + cf = IssueCustomField.create!(:name => 'Foo', :field_format => 'string', :tracker_ids => [2]) + WorkflowPermission.create!(:role_id => 1, :tracker_id => 2, :old_status_id => 1, :field_name => cf.id, :rule => 'required') get :permissions, :role_id => 1, :tracker_id => 2 assert_response :success assert_select 'td.required > select[name=?]', 'permissions[1][assigned_to_id]' + assert_select 'td.required > select[name=?]', "permissions[1][#{cf.id}]" end def test_post_permissions