diff options
Diffstat (limited to 'app/finders/issuable_finder.rb')
-rw-r--r-- | app/finders/issuable_finder.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/app/finders/issuable_finder.rb b/app/finders/issuable_finder.rb index 2eccc0ee31f..872c63d82bd 100644 --- a/app/finders/issuable_finder.rb +++ b/app/finders/issuable_finder.rb @@ -76,7 +76,7 @@ class IssuableFinder return @milestones if defined?(@milestones) @milestones = - if milestones? && params[:milestone_title] != NONE + if milestones? && params[:milestone_title] != NoMilestone.title Milestone.where(title: params[:milestone_title]) else nil @@ -183,7 +183,12 @@ class IssuableFinder def by_milestone(items) if milestones? - items = items.where(milestone_id: milestones.try(:pluck, :id)) + # `milestone_title` will still be present when "No Milestone" is selected + if params[:milestone_title] != NoMilestone.title + items = items.where(milestone_id: milestones.try(:pluck, :id)) + else + items = items.where(milestone_id: NoMilestone.id) + end end items |