diff --git a/CHANGELOG b/CHANGELOG
index cf75bee43485be53d172d86af0a46bcb8060c6d2..8f8439158df5ac34c43627dbfda20d33305486aa 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,7 @@
 Please view this file on the master branch, on stable branches it's out of date.
 
 v 8.11.0 (unreleased)
+  - Fix the title of the toggle dropdown button. !5515 (herminiotorres)
   - Remove magic comments (`# encoding: UTF-8`) from Ruby files. !5456 (winniehell)
   - Fix CI status icon link underline (ClemMakesApps)
   - Fix of 'Commits being passed to custom hooks are already reachable when using the UI'
diff --git a/app/controllers/projects/branches_controller.rb b/app/controllers/projects/branches_controller.rb
index 6126acccaab35f3d0953873f332471b2fb6e1d45..e926043f3ebadbcf21721efa2430daa852f23409 100644
--- a/app/controllers/projects/branches_controller.rb
+++ b/app/controllers/projects/branches_controller.rb
@@ -6,6 +6,7 @@ class Projects::BranchesController < Projects::ApplicationController
   before_action :authorize_push_code!, only: [:new, :create, :destroy]
 
   def index
+    @sort = params[:sort].presence || 'name'
     @branches = BranchesFinder.new(@repository, params).execute
     @branches = Kaminari.paginate_array(@branches).page(params[:page])
 
diff --git a/app/models/repository.rb b/app/models/repository.rb
index d8775ecbd6c8c6b1212cf8d0a6d42604e1b5e1f1..8a6f408651809682b27d7b2d0ed3772b357877b5 100644
--- a/app/models/repository.rb
+++ b/app/models/repository.rb
@@ -615,11 +615,11 @@ class Repository
     case value
     when 'name'
       branches.sort_by(&:name)
-    when 'recently_updated'
+    when 'updated_desc'
       branches.sort do |a, b|
         commit(b.target).committed_date <=> commit(a.target).committed_date
       end
-    when 'last_updated'
+    when 'updated_asc'
       branches.sort do |a, b|
         commit(a.target).committed_date <=> commit(b.target).committed_date
       end
diff --git a/app/views/projects/branches/index.html.haml b/app/views/projects/branches/index.html.haml
index cb190d121c2144af3b93d8c5e48751ab2f46cdca..e889f29c81605e021a97f5ab8bfec0359c1e9e4c 100644
--- a/app/views/projects/branches/index.html.haml
+++ b/app/views/projects/branches/index.html.haml
@@ -14,18 +14,15 @@
       .dropdown.inline
         %button.dropdown-toggle.btn{type: 'button', 'data-toggle' => 'dropdown'}
           %span.light
-          - if params[:sort].present?
-            = params[:sort].humanize
-          - else
-            Name
+            = projects_sort_options_hash[@sort]
           %b.caret
         %ul.dropdown-menu.dropdown-menu-align-right
           %li
-            = link_to filter_branches_path(sort: nil) do
+            = link_to filter_branches_path(sort: sort_value_name) do
               = sort_title_name
-            = link_to filter_branches_path(sort: 'recently_updated') do
+            = link_to filter_branches_path(sort: sort_value_recently_updated) do
               = sort_title_recently_updated
-            = link_to filter_branches_path(sort: 'last_updated') do
+            = link_to filter_branches_path(sort: sort_value_oldest_updated) do
               = sort_title_oldest_updated
 
       - if can? current_user, :push_code, @project
diff --git a/spec/finders/branches_finder_spec.rb b/spec/finders/branches_finder_spec.rb
index dd85203a038207b1cbaaa567fe83697d4704387b..6ea9a3a3ec5698efa758e44b727892203e1b9d53 100644
--- a/spec/finders/branches_finder_spec.rb
+++ b/spec/finders/branches_finder_spec.rb
@@ -16,7 +16,7 @@ describe BranchesFinder do
       end
 
       it 'sorts by recently_updated' do
-        branches_finder = described_class.new(repository, { sort: 'recently_updated' })
+        branches_finder = described_class.new(repository, { sort: 'updated_desc' })
 
         result = branches_finder.execute
 
@@ -24,7 +24,7 @@ describe BranchesFinder do
       end
 
       it 'sorts by last_updated' do
-        branches_finder = described_class.new(repository, { sort: 'last_updated' })
+        branches_finder = described_class.new(repository, { sort: 'updated_asc' })
 
         result = branches_finder.execute
 
@@ -53,7 +53,7 @@ describe BranchesFinder do
 
     context 'filter and sort' do
       it 'filters branches by name and sorts by recently_updated' do
-        params = { sort: 'recently_updated', search: 'feature' }
+        params = { sort: 'updated_desc', search: 'feature' }
         branches_finder = described_class.new(repository, params)
 
         result = branches_finder.execute
@@ -63,7 +63,7 @@ describe BranchesFinder do
       end
 
       it 'filters branches by name and sorts by last_updated' do
-        params = { sort: 'last_updated', search: 'feature' }
+        params = { sort: 'updated_asc', search: 'feature' }
         branches_finder = described_class.new(repository, params)
 
         result = branches_finder.execute