• 
      

    EasyFix: Fix Error 500 when sorting users list by fullname.

    Review Request #10155 — Created Sept. 21, 2018 and discarded — Latest diff uploaded

    Information

    Djblets
    release-1.0.x

    Reviewers

    When appending ?sort=fullname to /users/, ReviewBoard attempts to query and
    sort on 'fullname' which is not a correct field and causes an Error 500 to
    occur. Although most manual sort queries will be discarded as improper,
    fullname is allowed as a sort field because it corresponds to a Column name on
    the page. This has been fixed by detecting the special case for 'fullname' in
    grids.py and if 'fullname' is in the sort query, it is removed and replaced
    with 'first_name' and 'last_name' which are its composite substrings.

    Tested with Review Board 3.0.x by manually attempting ?sort=fullname and ?sort=-fullname on /users/, as well as sorting by fullname and username, and going back and forth between the fullname sort cases and username sort cases. I encountered no issues on my testing once the fix was applied.