blob: 23b6668e0d1c9de43a4fec73ddd5c8486ab56458 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
module Projects
class AutocompleteService < BaseService
def issues
@project.issues.visible_to_user(current_user).opened.select([:iid, :title])
end
def milestones
@project.milestones.active.reorder(due_date: :asc, title: :asc).select([:iid, :title])
end
def merge_requests
@project.merge_requests.opened.select([:iid, :title])
end
def labels
@project.labels.select([:title, :color])
end
end
end
|