CandyShop / gerrit

Automatically exported from code.google.com/p/gerrit
Apache License 2.0
1 stars 0 forks source link

Better user search for reviewer suggestion #2562

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Server is configured with:

  [ldap]
     accountFullName = displayName

User names from LDAP are in the form:

  "Surname, Firstname"

When adding a reviewer, users can start typing another user's surname and it 
will suggest reviewers.

Problem with this configuration is that the username is also used as the 
committer/author name on commits generated in the UI, for example when editing 
the commit message, rebasing a change, cherry-picking or reverting a change.

To fix that problem, we remove "accountFullName = displayName" from the ldap 
settings, and then the default is used:

  `${givenName} ${sn}`

which causes the names to be displayed as "Firstname Surname" as expected.

However this causes a side effect...

Users are accustomed to being able to find reviewers by typing the surname.  
This no longer works, because the suggestion engine only searches names from 
the beginning of the string.

Extra confusion is caused by the fact that user display names are only changed 
after they sign out and back in to Gerrit.  So some users (those that have not 
yet done the sign out/in) can be found by their surname, while the rest cannot.

This feature request is to improve the reviewer search feature such that it 
works for user names in both formats.

Original issue reported on code.google.com by david.pu...@sonymobile.com on 19 Mar 2014 at 11:07

GoogleCodeExporter commented 9 years ago
I am working on this.

Original comment by david.pu...@sonymobile.com on 25 Mar 2014 at 7:44

GoogleCodeExporter commented 9 years ago
Anything I can do to help? This would be pretty nice.

Some simple requirements:

* Searches should be case-insensitive, unless one or more characters are 
uppercase (sometimes known as "smart-case" vs case-(in)sensitive).
* Matches should work at any word boundary.
* Matches should also work at any case change (e.g. "feely" should find 
"McFeely")
* Matches should normalize the query and values to remove any ambiguity. e.g. 
"Höltje" should be converted to "Holtje". 

Original comment by docw...@gmail.com on 3 Sep 2014 at 6:14

GoogleCodeExporter commented 9 years ago
I made a start on this with [1] adding support for indexing accounts in the 
secondary index.  That turned out to be a lot more work than expected, and I 
didn't get very far with it.

Sven has started a separate approach in [2].

[1] https://gerrit-review.googlesource.com/56758
[2] https://gerrit-review.googlesource.com/#/c/59291/

Original comment by david.pu...@sonymobile.com on 4 Sep 2014 at 12:28