BigW Consortium Gitlab

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

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