• Hordur Freyr Yngvason's avatar
    Use lowercase values in user search ordering · e59a0922
    Hordur Freyr Yngvason authored
    Fixes a subtle bug in the user search ranking where a case-sensitive
    match (PostgreSQL string equality) was used on a value that had
    previously been converted to lowercase. As a result, exact matches could
    receive the lowest priority instead of the higest priority.
    
    For distinctive usernames, this was not a problem, as those would result
    in unique matches anyway. However, when the username matched a prefix of
    a common human name, an exact match could get buried at the bottom of
    the results.
    
    For example, since Alexander is a very common name, this made it
    virtually impossible to find @Alexand in most GitLab dropdowns.
    
    Changelog: fixed
    e59a0922
user_spec.rb 214 KB