Changeset - 96c86063278c
[Not reviewed]
default
0 1 0
Thomas De Schampheleire - 5 years ago 2020-09-25 11:11:11
thomas.de_schampheleire@nokia.com
autocomplete: also match on email address

There are cases where the firstname/lastname known to Kallithea, is not
complete, perhaps only an initial. But users that try to add a reviewer, may
start typing a full name and expect autocompletion.

For example:

firstname: John
lastname: D
email: john.doe@example.com

When a review starts typing 'Doe' they will not get any matches if
autocompletion is purely based on names.

This situation sometimes arises with Indian developers, where the names
known to companies may be abbreviated as initials. For example "C K Deepak"
where Deepak is the first name and C K are the initials of the last name.
1 file changed with 1 insertions and 0 deletions:
0 comments (0 inline, 0 general)
kallithea/controllers/home.py
Show inline comments
 
@@ -174,6 +174,7 @@ class HomeController(BaseController):
 
                        User.username.ilike("%%" + query + "%%"),
 
                        User.name.concat(' ').concat(User.lastname).ilike("%%" + query + "%%"),
 
                        User.lastname.concat(' ').concat(User.name).ilike("%%" + query + "%%"),
 
                        User.email.ilike("%%" + query + "%%"),
 
                    )) \
 
                    .order_by(User.username) \
 
                    .limit(500) \
0 comments (0 inline, 0 general)