BigW Consortium Gitlab

milestones_finder.rb 296 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12
class MilestonesFinder
  def execute(projects, params)
    milestones = Milestone.of_projects(projects)
    milestones = milestones.order("due_date ASC")

    case params[:state]
    when 'closed' then milestones.closed
    when 'all' then milestones
    else milestones.active
    end
  end
end