From 8caf5fced66abb37118ff33d55d156374dd7c4bc Mon Sep 17 00:00:00 2001 From: Kendall Nelson Date: Tue, 7 Aug 2018 15:08:25 -0700 Subject: [PATCH] Show Email Addresses when Searching Its hard to tell users apart when they have the same name, to help users distinguish who is who when searching, this patch enables the search helper to show both the name and email. Change-Id: I8f783f7674a47b789636245c785cb9a9a26c4370 Story: 2000132 Task: 24370 --- src/app/search/service/search_helper.js | 3 ++- src/app/search/template/user_search_item.html | 2 ++ src/app/stories/template/detail.html | 2 +- src/app/util/directive/user_typeahead.js | 2 +- src/app/util/template/user_typeahead.html | 5 +++-- 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/app/search/service/search_helper.js b/src/app/search/service/search_helper.js index 9bdade1b..317f30ff 100644 --- a/src/app/search/service/search_helper.js +++ b/src/app/search/service/search_helper.js @@ -67,7 +67,8 @@ angular.module('sb.search').factory('SearchHelper', criteria.push( Criteria.create('User', params.assignee_id, - result.full_name) + result.full_name + ' <' + + result.email + '>') ); } ); diff --git a/src/app/search/template/user_search_item.html b/src/app/search/template/user_search_item.html index 65158699..e882d1e9 100644 --- a/src/app/search/template/user_search_item.html +++ b/src/app/search/template/user_search_item.html @@ -1,4 +1,6 @@ {{user.full_name}} +<{{user.email}}> + Last Login: {{user.last_login | date: 'mediumDate'}} diff --git a/src/app/stories/template/detail.html b/src/app/stories/template/detail.html index 217aa3a4..5304a565 100644 --- a/src/app/stories/template/detail.html +++ b/src/app/stories/template/detail.html @@ -91,7 +91,7 @@ - {{creator.full_name}} + {{creator.full_name}} <{{creator.email}}>
Last updated: diff --git a/src/app/util/directive/user_typeahead.js b/src/app/util/directive/user_typeahead.js index 8531f473..426025f9 100644 --- a/src/app/util/directive/user_typeahead.js +++ b/src/app/util/directive/user_typeahead.js @@ -144,7 +144,7 @@ angular.module('sb.util').directive('userTypeahead', */ $scope.formatUserName = function (model) { if (!!model) { - return model.full_name; + return model.full_name + ' <' + model.email + '>'; } return ''; }; diff --git a/src/app/util/template/user_typeahead.html b/src/app/util/template/user_typeahead.html index fcbb309b..87c915bb 100644 --- a/src/app/util/template/user_typeahead.html +++ b/src/app/util/template/user_typeahead.html @@ -8,7 +8,8 @@ ng-if="user && !user.$resolved">   - {{user.full_name}} + {{user.full_name}} + <{{user.email}}>