My favorites | Sign in
Project Home Wiki Issues
New issue   Search
for
  Advanced search   Search tips
Issue 1352: Uncaught TypeError when entering multiple lengthy bug #s for a review request
1 person starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  chip...@gmail.com
Closed:  Oct 2009


Sign in to add a comment
 
Reported by thilo.al...@gmail.com, Oct 8, 2009
*NOTE: Do not post confidential information in this bug report.*

What version are you running?
1.0.4

What's the URL of the page containing the problem?
https://reviewboard.<domain>/api/json/reviewrequests/<#>/publish/

What steps will reproduce the problem?
1. Post a review for a repository that has an issue tracker assigned
2. Enter two lengthy numerical bug IDs, such as 012006153200030304432009,
012006153200030304432010
3. Publish

What is the expected output? What do you see instead?

Sorting the bug #s fails with a TypeError, which is not anticipated by the
code:

Request Method: POST 
Request URL: https://reviewboard.<domain>/api/json/reviewrequests/<#>/publish/
Exception Type: TypeError
Exception Value: comparison function must return int 
Exception Location: [...]\reviewboard\reviews\models.py in get_bug_list,
line 550 

549 : try:
550 :   bugs.sort(cmp=lambda x,y: int(x) - int(y))
551 : except ValueError:
552 :   bugs.sort()

Comment 1 by thilo.al...@gmail.com, Oct 8, 2009
I submitted a patch proposal at: http://reviews.review-board.org/r/1168/
Comment 2 by project member chip...@gmail.com, Oct 9, 2009
Fixed on master (r10b5857) and release-1.0.x (r62b792c).
Status: Fixed
Owner: chipx86
Labels: Milestone-Release1.0.x Component-Reviews
Sign in to add a comment

Powered by Google Project Hosting