diff options
author | Robert Speicher <robert@gitlab.com> | 2017-08-07 22:22:41 +0300 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2017-08-07 22:22:41 +0300 |
commit | 4e2b630df716174ea9b07319a0fd5eda7b60cf8e (patch) | |
tree | c3d1a509818b86bc8bbc96cb84bae8113cfe7868 /app/services/projects/autocomplete_service.rb | |
parent | bc648ae5d225b3b76cc3105681e2f404a5918f85 (diff) | |
parent | df00ebded67e871dfab226db3ffadc3dd6807d79 (diff) |
Merge branch 'group-milestone-references-system-notes' into 'master'
Support group milestone references
Closes #34778
See merge request !13289
Diffstat (limited to 'app/services/projects/autocomplete_service.rb')
-rw-r--r-- | app/services/projects/autocomplete_service.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/app/services/projects/autocomplete_service.rb b/app/services/projects/autocomplete_service.rb index fc85f398935..724a77c873a 100644 --- a/app/services/projects/autocomplete_service.rb +++ b/app/services/projects/autocomplete_service.rb @@ -5,7 +5,15 @@ module Projects end def milestones - @project.milestones.active.reorder(due_date: :asc, title: :asc).select([:iid, :title]) + finder_params = { + project_ids: [@project.id], + state: :active, + order: { due_date: :asc, title: :asc } + } + + finder_params[:group_ids] = [@project.group.id] if @project.group + + MilestonesFinder.new(finder_params).execute.select([:iid, :title]) end def merge_requests |