OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
openproject/app/controllers/rb_master_backlogs_controll...

35 lines
1.1 KiB

class RbMasterBacklogsController < RbApplicationController
unloadable
menu_item :backlogs
def show
@owner_backlogs = Backlog.owner_backlogs(@project)
@sprint_backlogs = Backlog.sprint_backlogs(@project)
@available_statuses_by_tracker = find_all_available_statuses_for_current_user
@last_update = (@sprint_backlogs + @owner_backlogs).map(&:updated_on).compact.max
end
def find_all_available_statuses_for_current_user
available_statuses_by_tracker = {}
user_roles = User.current.roles_for_project(@project)
issue_statuses = Workflow.available_statuses(@project,User.current)
Story.trackers.each do |tracker_id|
issue_statuses.each do |status|
tracker = Tracker.find(tracker_id)
allowed_statuses = status.new_statuses_allowed_to(user_roles,tracker)
unless allowed_statuses.empty?
available_statuses_by_tracker[tracker] ||= {}
available_statuses_by_tracker[tracker][status] = (allowed_statuses << status).uniq.sort_by(&:position)
end
end
end
return available_statuses_by_tracker
end
def default_breadcrumb
l(:label_backlogs)
end
end