• 
      

    Add user-friendly string conversion for Review Request's status.

    Review Request #6620 — Created Nov. 22, 2014 and discarded

    Information

    Review Board
    master

    Reviewers

    Add easy conversion from a Review Request's status code to a user-friendly version

    Tested each status type and returned correct result.

    Description From Last Updated

    We already have this information in ReviewRequest.STATUSES

    daviddavid
    ML
    ML
    reviewbot
    1. Tool: Pyflakes
      Processed Files:
          reviewboard/reviews/models/review_request.py
      
      
      
      Tool: PEP8 Style Checker
      Processed Files:
          reviewboard/reviews/models/review_request.py
      
      
    2. 
        
    david
    1. 
        
    2. reviewboard/reviews/models/review_request.py (Diff revision 1)
       
       
       
       
       
       
       
       
       
       
       
      Show all issues

      We already have this information in ReviewRequest.STATUSES

      1. So what is the best way to retrieve the nice string? iterate through STATUSES until you find the proper code?

      2. It looks like django already provides a method to do that. Give review_request.get_status_display() a try.

    3. 
        
    ML
    Review request changed
    Status:
    Discarded
    Change Summary:

    Django offers a method that does the same.