1632: Alphabetial sorting of review requests should not be case sensitive
- ThirdParty
- Review Board
yodan.******@gmai***** (Google Code) (Is this you? Claim this profile.) | |
March 21, 2011 |
What version are you running? 1.0.6 What's the URL of the page containing the problem? It's on the intranet, so it probably won't help much. http://[review-board-host]/reviews/r/?page=4&sort=submitter What steps will reproduce the problem? 1. Go to a list of review requests, e.g. "All review requests" 2. Sort the list by the submitter name (click on "Submitter" title) What is the expected output? What do you see instead? I can see the requests sorted by the submitter names in this order (note the capitalization): "Alexey, Jenia, Lev, alex, boris, dan..." They should obviously be sorted this way: "alex, Alexey, boris, dan, Jenia, Lev..." What operating system are you using? What browser? Client: Firefox 3.6.3 on Windows XP 64bit Server: Apache/2.2.12 (Ubuntu) Server
I'm curse I did not have this problem at version 0.9... Possibly it depends the Database you are using,like when doing "select ... order by ....". (I'm MySQL) If DB is case-sensitive then RB is case-sensitive. Also I'm afraid this is a "issue" to djblets/django after dig their source code.
I fail to reproduce it on 1.6 alpha 0... It looks fine even if it is related to Alphabetial sorting. It turns out now as the following:"...alfaomega,anirudaha,asaasa,Ashwani,at3r....." I guess this problem has already been fixed.
This looks like a database issue. Running: SELECT u.username FROM reviews_reviewrequest r INNER JOIN auth_user u ON r.submitter_id = u.id ORDER BY u.username; MySQL: alex mark Nathan SQLite3: Nathan alex mark
I was able to reproduce this defect: Using SQLite database (not MySQL) Steps: 1. make some new users: Ter ter Hello hello 2. have each user create a review request 3. go to view all reviews 4. click the sort by submitter button 5. should end up with the order: Hello Ter hello ter instead of: Hello hello Ter ter
This seems to be database related (the order_by() function in django can order by a list of fields from a table, but there is no way to ignore case (adding lower() around the sort items makes them invalid fields as far as order_by is concerned), so if the database being used is case-sensitive then this defect will occur. I think this would either require a sort after retrieving the entire list from the database, or changing the table structure to have a lower-case column for anything that you want to ignore case (which seems hacky).