<% end %>
<th><%=l(:field_is_closed)%></th>
<th></th>
+ <th></th>
</tr></thead>
<tbody>
<% for status in @issue_statuses %>
<td><%= status.default_done_ratio %></td>
<% end %>
<td><%= checked_image status.is_closed? %></td>
+ <td>
+ <% unless WorkflowTransition.where('old_status_id = ? OR new_status_id = ?', status.id, status.id).exists? %>
+ <span class="icon icon-warning">
+ <%= l(:text_status_no_workflow) %> (<%= link_to l(:button_edit), workflows_edit_path(:used_statuses_only => 0) %>)
+ </span>
+ <% end %>
+ </td>
<td class="buttons">
<%= reorder_handle(status) %>
<%= delete_link issue_status_path(status) %>
text_length_between: "Length between %{min} and %{max} characters."
text_tracker_no_workflow: No workflow defined for this tracker
text_role_no_workflow: No workflow defined for this role
+ text_status_no_workflow: No tracker uses this status in the workflows
text_unallowed_characters: Unallowed characters
text_comma_separated: Multiple values allowed (comma separated).
text_line_separated: Multiple values allowed (one line for each value).
assert_response 406
end
+ def test_index_should_show_warning_when_no_workflow_is_defined
+ status = IssueStatus.new :name => "No workflow"
+ status.save!
+
+ get :index
+ assert_response :success
+ assert_select 'table.issue_statuses tbody' do
+ assert_select 'tr:not(:last-of-type) span.icon-warning', :count => 0
+ assert_select 'tr:last-of-type' do
+ assert_select 'td.name', :text => status.name
+ assert_select 'td:nth-of-type(3) span.icon-warning', :text => /#{I18n.t(:text_status_no_workflow)}/
+ end
+ end
+ end
+
def test_new
get :new
assert_response :success