diff --git a/app/assets/javascripts/api.js.coffee b/app/assets/javascripts/api.js.coffee
index 36c6a76e09c20c8eab1c98f2f45533a04277ff33..2ddf8612db30ac4b36ddc18d4b1fb52a86b35cee 100644
--- a/app/assets/javascripts/api.js.coffee
+++ b/app/assets/javascripts/api.js.coffee
@@ -5,7 +5,6 @@
   group_projects_path: "/api/:version/groups/:id/projects.json"
   projects_path: "/api/:version/projects.json"
   labels_path: "/api/:version/projects/:id/labels"
-  milestones_path: "/api/:version/projects/:id/milestones"
 
   group: (group_id, callback) ->
     url = Api.buildUrl(Api.group_path)
@@ -63,18 +62,6 @@
     ).done (projects) ->
       callback(projects)
 
-  projectLabels: (project_id, callback) ->
-    url = Api.buildUrl(Api.labels_path)
-    url = url.replace(':id', project_id)
-
-    $.ajax(
-      url: url
-      data:
-        private_token: gon.api_token
-      dataType: "json"
-    ).done (labels) ->
-      callback(labels)
-
   newLabel: (project_id, data, callback) ->
     url = Api.buildUrl(Api.labels_path)
     url = url.replace(':id', project_id)
@@ -88,19 +75,6 @@
     ).done (label) ->
       callback(label)
 
-
-  milestones: (project_id, callback) ->
-    url = Api.buildUrl(Api.milestones_path)
-    url = url.replace(':id', project_id)
-
-    $.ajax(
-      url: url
-      data:
-        private_token: gon.api_token
-      dataType: "json"
-    ).done (milestones) ->
-      callback(milestones)
-
   # Return group projects list. Filtered by query
   groupProjects: (group_id, query, callback) ->
     url = Api.buildUrl(Api.group_projects_path)
diff --git a/app/assets/javascripts/gl_dropdown.js.coffee b/app/assets/javascripts/gl_dropdown.js.coffee
index c65b3e31450ec18d1755d9287c8d727a8d5e58f8..a714ba3d675f0ba89aac5779c351c7fc606654db 100644
--- a/app/assets/javascripts/gl_dropdown.js.coffee
+++ b/app/assets/javascripts/gl_dropdown.js.coffee
@@ -220,7 +220,6 @@ class GitLabDropdown
     if @renderedData
       selectedObject = @renderedData[selectedIndex]
     value = if @options.id then @options.id(selectedObject, el) else selectedObject.id
-    console.log value
 
     if @options.multiSelect
       fieldName = "#{fieldName}[]"
diff --git a/app/assets/javascripts/labels_select.js.coffee b/app/assets/javascripts/labels_select.js.coffee
index 0b4e2ad7aa653f44293e6e0d9d90b3400baf6488..14ee529ba353a695846215067c6d9d304429e617 100644
--- a/app/assets/javascripts/labels_select.js.coffee
+++ b/app/assets/javascripts/labels_select.js.coffee
@@ -2,6 +2,7 @@ class @LabelsSelect
   constructor: ->
     $('.js-label-select').each (i, dropdown) ->
       projectId = $(dropdown).data('project-id')
+      labelUrl = $(dropdown).data("labels")
       selectedLabel = $(dropdown).data('selected')
       newLabelField = $('#new_label_name')
       newColorField = $('#new_label_color')
@@ -32,13 +33,25 @@ class @LabelsSelect
 
       $(dropdown).glDropdown(
         data: (term, callback) ->
-          Api.projectLabels 8, callback
+          # We have to fetch the JS version of the labels list because there is no
+          # public facing JSON url for labels
+          $.ajax(
+            url: labelUrl
+          ).done (data) ->
+            html = $(data)
+            data = []
+            html.find('.label-row a').each ->
+              data.push(
+                title: $(@).text().trim()
+              )
+
+            callback data
         renderRow: (label) ->
-          selected = if label.name is selectedLabel then "is-active" else ""
+          selected = if label.title is selectedLabel then "is-active" else ""
 
           "<li>
             <a href='#' class='#{selected}'>
-              #{label.name}
+              #{label.title}
             </a>
           </li>"
         filterable: true
@@ -47,7 +60,7 @@ class @LabelsSelect
         selectable: true
         fieldName: $(dropdown).data('field-name')
         id: (label) ->
-          label.name
+          label.title
         clicked: ->
           if $(dropdown).hasClass "js-filter-submit"
             $(dropdown).parents('form').submit()
diff --git a/app/assets/javascripts/milestone_select.js.coffee b/app/assets/javascripts/milestone_select.js.coffee
index 9c45800af6e5e4d4d04ccbb0315b3f109b821fc3..92b42bfe864a2b44276dc5095d1f62caa55d7e82 100644
--- a/app/assets/javascripts/milestone_select.js.coffee
+++ b/app/assets/javascripts/milestone_select.js.coffee
@@ -2,18 +2,29 @@ class @MilestoneSelect
   constructor: ->
     $('.js-milestone-select').each (i, dropdown) ->
       projectId = $(dropdown).data('project-id')
+      milestonesUrl = $(dropdown).data('milestones')
       selectedMilestone = $(dropdown).data('selected')
       showNo = $(dropdown).data('show-no')
       showAny = $(dropdown).data('show-any')
+      useId = $(dropdown).data('use-id')
 
       $(dropdown).glDropdown(
         data: (term, callback) ->
-          Api.milestones projectId, (data) ->
-            data = $.map data, (milestone) ->
-              return milestone if milestone.state isnt "closed"
+          $.ajax(
+            url: milestonesUrl
+          ).done (data) ->
+            html = $(data)
+            data = []
+            html.find('.milestone strong a').each ->
+              link = $(@).attr("href").split("/")
+              data.push(
+                id: link[link.length - 1]
+                title: $(@).text().trim()
+              )
 
             if showNo
               data.unshift(
+                id: "0"
                 title: 'No milestone'
               )
 
@@ -34,10 +45,13 @@ class @MilestoneSelect
         text: (milestone) ->
           milestone.title
         id: (milestone) ->
-          if milestone.title isnt "Any milestone"
-            milestone.title
+          if !useId
+            if milestone.title isnt "Any milestone"
+              milestone.title
+            else
+              ""
           else
-            ""
+            milestone.id
         isSelected: (milestone) ->
           milestone.title is selectedMilestone
         clicked: ->
diff --git a/app/views/shared/issuable/_filter.html.haml b/app/views/shared/issuable/_filter.html.haml
index b261ca498c6ad486f0c76f7e208258f910ec7d17..0e023a6809597be32cdcd252db3bea67657f690d 100644
--- a/app/views/shared/issuable/_filter.html.haml
+++ b/app/views/shared/issuable/_filter.html.haml
@@ -22,7 +22,7 @@
           - if params[:milestone_title]
             = hidden_field_tag(:milestone_title, params[:milestone_title])
           = dropdown_tag("Milestone", title: "Filter by milestone", toggle_class: 'js-milestone-select js-filter-submit', filter: true, dropdown_class: "dropdown-menu-selectable",
-            placeholder: "Search milestones", footer_content: true, data: {show_no: true, show_any: true, field_name: "milestone_title", selected: params[:milestone_title], project_id: @project.id}) do
+            placeholder: "Search milestones", footer_content: true, data: {show_no: true, show_any: true, field_name: "milestone_title", selected: params[:milestone_title], project_id: @project.id, milestones: namespace_project_milestones_path(@project.namespace, @project, :js)}) do
             %ul.dropdown-footer-list
               - if can? current_user, :admin_milestone, @project
                 %li
@@ -39,7 +39,7 @@
           - if params[:label_name]
             = hidden_field_tag(:label_name, params[:label_name])
           .dropdown
-            %button.dropdown-menu-toggle.js-label-select.js-filter-submit{type: "button", data: {toggle: "dropdown", field_name: "label_name", selected: params[:label_name], project_id: @project.id}}
+            %button.dropdown-menu-toggle.js-label-select.js-filter-submit{type: "button", data: {toggle: "dropdown", field_name: "label_name", selected: params[:label_name], project_id: @project.id, labels: namespace_project_labels_path(@project.namespace, @project, :js)}}
               %span.dropdown-toggle-text
                 Label
               = icon('chevron-down')
@@ -106,7 +106,7 @@
               placeholder: "Search authors", data: {first_user: true, current_user: true, project_id: @project.id, field_name: "update[assignee_id]"})
           .filter-item.inline
             = dropdown_tag("Milestone", title: "Assign milestone", toggle_class: 'js-milestone-select', filter: true, dropdown_class: "dropdown-menu-selectable",
-              placeholder: "Search milestones", data: {show_no: true, field_name: "update[milestone_id]", project_id: @project.id})
+              placeholder: "Search milestones", data: {show_no: true, field_name: "update[milestone_id]", project_id: @project.id, milestones: namespace_project_milestones_path(@project.namespace, @project, :js), use_id: true})
           = hidden_field_tag 'update[issues_ids]', []
           = hidden_field_tag :state_event, params[:state_event]
           .filter-item.inline