Feature #30916 » no-workflow-warning-for-statuses-v3.patch
| app/views/issue_statuses/index.html.erb | ||
|---|---|---|
|
<% 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) %>
|
||
| config/locales/en.yml | ||
|---|---|---|
|
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).
|
||
| test/functional/issue_statuses_controller_test.rb | ||
|---|---|---|
|
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
|
||
- « Previous
- 1
- …
- 3
- 4
- 5
- Next »