diff options
author | Felipe Artur <felipefac@gmail.com> | 2016-04-27 18:35:30 +0300 |
---|---|---|
committer | Felipe Artur <felipefac@gmail.com> | 2016-05-24 23:49:15 +0300 |
commit | 996240a4895abddf069eb6fc195bacee5e344e16 (patch) | |
tree | 58d77ae37f32a159952cfbbe519a8c2c75b32b98 /app/finders | |
parent | baa9c66057fccefce05b9f01009942fb079fee22 (diff) |
Fix issues/MRs filter when ordering by milestone due date
Diffstat (limited to 'app/finders')
-rw-r--r-- | app/finders/issuable_finder.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/finders/issuable_finder.rb b/app/finders/issuable_finder.rb index 5849e00662b..0e3dfa74ac4 100644 --- a/app/finders/issuable_finder.rb +++ b/app/finders/issuable_finder.rb @@ -253,9 +253,9 @@ class IssuableFinder items = items.where(milestone_id: [-1, nil]) elsif filter_by_upcoming_milestone? upcoming_ids = Milestone.upcoming_ids_by_projects(projects) - items = items.joins(:milestone).where(milestone_id: upcoming_ids) + items = items.left_joins_milestones.where(milestone_id: upcoming_ids) else - items = items.joins(:milestone).where(milestones: { title: params[:milestone_title] }) + items = items.left_joins_milestones.where(milestones: { title: params[:milestone_title] }) if projects items = items.where(milestones: { project_id: projects }) |