layout 'admin'
before_filter :require_admin
-
+ before_filter :find_roles
+ before_filter :find_trackers
+
def index
@workflow_counts = Workflow.count_by_tracker_and_role
end
redirect_to :action => 'edit', :role_id => @role, :tracker_id => @tracker
end
end
- @roles = Role.find(:all, :order => 'builtin, position')
- @trackers = Tracker.find(:all, :order => 'position')
@used_statuses_only = (params[:used_statuses_only] == '0' ? false : true)
if @tracker && @used_statuses_only && @tracker.issue_statuses.any?
end
def copy
- @trackers = Tracker.find(:all, :order => 'position')
- @roles = Role.find(:all, :order => 'builtin, position')
if params[:source_tracker_id].blank? || params[:source_tracker_id] == 'any'
@source_tracker = nil
end
end
end
+
+ private
+
+ def find_roles
+ @roles = Role.find(:all, :order => 'builtin, position')
+ end
+
+ def find_trackers
+ @trackers = Tracker.find(:all, :order => 'position')
+ end
end