Defect #22305 » defect-22305.diff
| app/views/workflows/permissions.html.erb (working copy) | ||
|---|---|---|
|
<%= field.name %> <%= content_tag('span', '*', :class => 'required') if field_required?(field) %>
|
||
|
</td>
|
||
|
<% for status in @statuses -%>
|
||
|
<td class="<%= @permissions[status.id][field.id.to_s] %>">
|
||
|
<td class="<%= @permissions[status.id][field.id.to_s].try(:join, ' ') %>">
|
||
|
<%= field_permission_tag(@permissions, status, field, @roles) %>
|
||
|
<% unless status == @statuses.last %><a href="#" class="repeat-value">»</a><% end %>
|
||
|
</td>
|
||
| test/functional/workflows_controller_test.rb (working copy) | ||
|---|---|---|
|
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
|
||
- « Previous
- 1
- 2
- Next »