Return the correct user from the last update resource

Review Request #9709 — Created April 25, 2018 and submitted

brennie
Review Board
release-3.0.x
4654
8800
77756b5...
reviewboard

A while back we started recording who published review requests in the
ChangeDescription so that re-assigned review requests showed proper
history (instead of just showing the new author doing everything).
This patch updates the ReviewRequestLastUpdateResource to take this
information into account.

As a part of this change, ReviewRequest.get_last_activity has been
deprecated in favour of a new method,
ReviewRequest.get_last_activity_info, which returns a dict of
information, including the relevant ChangeDescription, which can be
used to determine the author of the update.

Additionally, unit tests have been added to cover the last update
resource's behaviour.

Ran unit tests.

  • 0
  • 0
  • 15
  • 0
  • 15
Description From Last Updated
Checks run (1 failed, 1 succeeded)
flake8 failed.
JSHint passed.

flake8

brennie
david
  1. 
      
  2. reviewboard/reviews/tests/test_review_request.py (Diff revision 2)
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     

    I feel like we have three test cases here that should probably be three separate test methods.

  3. This blank line should go away too.

  4. This blank line should go away too

  5. reviewboard/webapi/tests/mixins.py (Diff revision 2)
     
     
     
     
     
     
     

    Leftover debug output?

  6. 
      
brennie
chipx86
  1. 
      
  2. We have a new section for docstrings. It goes before Args:

    Deprecated:
        4.0:
        See blah blah...
    
  3. reviewboard/reviews/models/review_request.py (Diff revision 3)
     
     
     
     
     

    Missing "Args".

  4. Missing indentation.

    No need for quotes, just the double backticks. Same below.

  5. reviewboard/reviews/models/review_request.py (Diff revision 3)
     
     
     
     

    Remove the blank line.

  6. is self, probably?

  7. Blank line between these.

  8. Blank line between these.

  9. 
      
brennie
brennie
david
  1. Ship It!
  2. 
      
brennie
Review request changed

Status: Closed (submitted)

Change Summary:

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