Add project scope to milestone search
This commit is contained in:
parent
b5762104ab
commit
ac44e3844d
1 changed files with 8 additions and 1 deletions
|
@ -81,7 +81,14 @@ class IssuableFinder
|
|||
|
||||
@milestones =
|
||||
if milestones?
|
||||
Milestone.where(title: params[:milestone_title])
|
||||
scope =
|
||||
if project
|
||||
project.milestones
|
||||
else
|
||||
Milestone.all
|
||||
end
|
||||
|
||||
scope.where(title: params[:milestone_title])
|
||||
else
|
||||
nil
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue