From 1f90df083481975b7ceb0693a5bbb1164c5d2e1d Mon Sep 17 00:00:00 2001
From: Phil Hughes <me@iamphill.com>
Date: Tue, 28 Jun 2016 16:59:36 +0100
Subject: [PATCH] Changed collapsed assignee tooltip to users name Fixes
 tooltip when updating the assignee

Closes #19280 #19281
---
 app/assets/javascripts/users_select.js.coffee | 6 +++++-
 app/views/shared/issuable/_sidebar.html.haml  | 2 +-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/app/assets/javascripts/users_select.js.coffee b/app/assets/javascripts/users_select.js.coffee
index 4e032ab1ff1..344be811e0d 100644
--- a/app/assets/javascripts/users_select.js.coffee
+++ b/app/assets/javascripts/users_select.js.coffee
@@ -56,6 +56,11 @@ class @UsersSelect
               username: ''
               avatar: ''
           $value.html(assigneeTemplate(user))
+
+          $collapsedSidebar
+            .attr('title', user.name)
+            .tooltip('fixTitle')
+
           $collapsedSidebar.html(collapsedAssigneeTemplate(user))
 
 
@@ -63,7 +68,6 @@ class @UsersSelect
         '<% if( avatar ) { %>
         <a class="author_link" href="/u/<%- username %>">
           <img width="24" class="avatar avatar-inline s24" alt="" src="<%- avatar %>">
-          <span class="author">Toni Boehm</span>
         </a>
         <% } else { %>
         <i class="fa fa-user"></i>
diff --git a/app/views/shared/issuable/_sidebar.html.haml b/app/views/shared/issuable/_sidebar.html.haml
index adfab1af53e..e020a7d4d00 100644
--- a/app/views/shared/issuable/_sidebar.html.haml
+++ b/app/views/shared/issuable/_sidebar.html.haml
@@ -19,7 +19,7 @@
 
     = form_for [@project.namespace.becomes(Namespace), @project, issuable], remote: true, format: :json, html: {class: 'issuable-context-form inline-update js-issuable-update'} do |f|
       .block.assignee
-        .sidebar-collapsed-icon.sidebar-collapsed-user{data: {toggle: "tooltip", placement: "left", container: "body"}, title: (issuable.assignee.to_reference if issuable.assignee)}
+        .sidebar-collapsed-icon.sidebar-collapsed-user{data: {toggle: "tooltip", placement: "left", container: "body"}, title: (issuable.assignee.name if issuable.assignee)}
           - if issuable.assignee
             = link_to_member(@project, issuable.assignee, size: 24)
           - else
-- 
GitLab