Make fullname column sortable on /users/ page
Review Request #10277 — Created Oct. 25, 2018 and updated — Latest diff uploaded
This fix makes the
FullNameColumncolumn of the/users/page
sortable. Previously, onlyUsernameColumnwas sortable.In order to implement this, an override method for
get_sort_field()
was added toFullNameColumnwhich returns thefirst_nameand
last_nameas a tuple. A related change in the Djblets side enables
handling of tuples as returns fromget_sort_field().Two unit tests were added to test sorting of the test users in both
ascending and descending order using custom first and last names.
All tests pass for Review Board, except "Testing PerforceTool.connect
sets required client args", which can be disregarded for now.
Diff Revision 8
This is not the most recent revision of the diff. The latest diff is revision 10. See what's changed.
| reviewboard/datagrids/columns.py |
|---|
| reviewboard/datagrids/grids.py |
|---|
| reviewboard/datagrids/tests.py |
|---|