Fix issues when searching for strings of digits.

Review Request #7185 — Created April 8, 2015 and submitted

Information

Review Board
release-2.0.x
17b99ad...

Reviewers

We have an escape hatch that allows users to type in a review request ID into
the search box and jump straight there. Unfortunately, the way that it was
implemented meant that if there were no results for that (say, a user was
typing in a bug number instead), it would crash.

It turns out that we already had code that handled looking up the review
request ID directly. I've added some additional permissions checking to that to
make us only redirect when the searching user has access to the review request,
and otherwise the search is done using the text rather than trying to have
special cases for digit searches vs. non-digit searches.

  • Ran unit tests.
  • Searched for a string of digits that did not correspond to a review request
    ID.
Description From Last Updated

"object"

chipx86chipx86

Blank line before this.

chipx86chipx86
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/search/views.py
        reviewboard/testing/testcase.py
        reviewboard/search/tests.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/search/views.py
        reviewboard/testing/testcase.py
        reviewboard/search/tests.py
    
    
  2. 
      
chipx86
  1. 
      
  2. reviewboard/search/tests.py (Diff revision 1)
     
     
    Show all issues

    "object"

  3. reviewboard/search/views.py (Diff revision 1)
     
     
    Show all issues

    Blank line before this.

  4. 
      
david
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-2.0.x (1e74cd7)
Loading...