gitlab-org--gitlab-foss/app/finders/milestones_finder.rb

13 lines
298 B
Ruby
Raw Normal View History

class MilestonesFinder
def execute(projects, params)
milestones = Milestone.of_projects(projects)
2015-11-30 15:47:44 -05:00
milestones = milestones.reorder("due_date ASC")
case params[:state]
when 'closed' then milestones.closed
when 'all' then milestones
else milestones.active
end
end
end