@@ -0,0 +1,9 | |||||
|
1 | class AddRoleTrackerOldStatusIndexToWorkflows < ActiveRecord::Migration | |||
|
2 | def self.up | |||
|
3 | add_index :workflows, [:role_id, :tracker_id, :old_status_id], :name => :workflows_role_tracker_old_status | |||
|
4 | end | |||
|
5 | ||||
|
6 | def self.down | |||
|
7 | remove_index :workflows, :name => :workflows_role_tracker_old_status | |||
|
8 | end | |||
|
9 | end |
@@ -94,7 +94,7 class RolesController < ApplicationController | |||||
94 | end |
|
94 | end | |
95 | @roles = Role.find(:all, :order => 'builtin, position') |
|
95 | @roles = Role.find(:all, :order => 'builtin, position') | |
96 | @trackers = Tracker.find(:all, :order => 'position') |
|
96 | @trackers = Tracker.find(:all, :order => 'position') | |
97 |
@statuses = IssueStatus.find(:all, |
|
97 | @statuses = IssueStatus.find(:all, :order => 'position') | |
98 | end |
|
98 | end | |
99 |
|
99 | |||
100 | def report |
|
100 | def report |
@@ -35,18 +35,16 | |||||
35 |
|
35 | |||
36 | <% for old_status in @statuses %> |
|
36 | <% for old_status in @statuses %> | |
37 | <tr> |
|
37 | <tr> | |
38 |
<td><%= old_status.name %></td> |
|
38 | <td><%= old_status.name %></td> | |
39 | <% for new_status in @statuses %> |
|
39 | <% new_status_ids_allowed = old_status.find_new_statuses_allowed_to(@role, @tracker).collect(&:id) -%> | |
|
40 | <% for new_status in @statuses -%> | |||
40 | <td align="center"> |
|
41 | <td align="center"> | |
41 |
|
42 | <input type="checkbox" | ||
42 | <input type="checkbox" |
|
|||
43 | name="issue_status[<%= old_status.id %>][]" |
|
43 | name="issue_status[<%= old_status.id %>][]" | |
44 | value="<%= new_status.id %>" |
|
44 | value="<%= new_status.id %>" | |
45 | <%if old_status.new_statuses_allowed_to(@role, @tracker).include? new_status%>checked="checked"<%end%> |
|
45 | <%= 'checked="checked"' if new_status_ids_allowed.include? new_status.id %>> | |
46 | > |
|
|||
47 | </td> |
|
46 | </td> | |
48 |
<% end %> |
|
47 | <% end -%> | |
49 |
|
||||
50 | </tr> |
|
48 | </tr> | |
51 | <% end %> |
|
49 | <% end %> | |
52 | </table> |
|
50 | </table> |
General Comments 0
You need to be logged in to leave comments.
Login now