2015-04-26 12:48:37 +05:30
|
|
|
module Projects
|
|
|
|
class AutocompleteService < BaseService
|
2016-06-02 11:05:42 +05:30
|
|
|
def issues
|
|
|
|
@project.issues.visible_to_user(current_user).opened.select([:iid, :title])
|
2015-04-26 12:48:37 +05:30
|
|
|
end
|
|
|
|
|
2016-06-02 11:05:42 +05:30
|
|
|
def milestones
|
|
|
|
@project.milestones.active.reorder(due_date: :asc, title: :asc).select([:iid, :title])
|
2015-04-26 12:48:37 +05:30
|
|
|
end
|
|
|
|
|
|
|
|
def merge_requests
|
|
|
|
@project.merge_requests.opened.select([:iid, :title])
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|