Fix types in computation of latest timestamp of review entries.

Review Request #8536 — Created Nov. 11, 2016 and submitted

Information

Review Board
release-3.0.x
930c781...

Reviewers

I had implemented the computation of the latest timestamp of review entries
using datetime.ctime(), which in my sleep-deprived state I thought was
returning seconds since the epoch. In reality, it returns a string with a
human-readable date and time. This would often sort the way people expected
because in most cases, all the review entries come from the same month, and
other parts of the date string are increasing numerically, but it wasn't at all
correct.

I had done it this way because I was being lazy with my defaultdict. I've
changed things up to actually store and sort on the datetime objects directly
rather than trying to convert them to a number.

  • Ran unit tests.
  • Created a review request with a bunch of review entries and replies, and saw
    things work correctly.
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/reviews/views.py
        reviewboard/reviews/detail.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/reviews/views.py
        reviewboard/reviews/detail.py
    
    
  2. 
      
brennie
  1. Ship It!
  2. 
      
chipx86
  1. Ship It!
  2. 
      
david
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-3.0.x (3be8ce0)
Loading...