Return the correct user from the last update resource

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

Information

Review Board
release-3.0.x
77756b5...

Reviewers

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.

Description From Last Updated

E303 too many blank lines (2)

reviewbotreviewbot

F841 local variable 'updated_obj' is assigned to but never used

reviewbotreviewbot

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

daviddavid

This blank line should go away too.

daviddavid

This blank line should go away too

daviddavid

Leftover debug output?

daviddavid

We have a new section for docstrings. It goes before Args: Deprecated: 4.0: See blah blah...

chipx86chipx86

Missing "Args".

chipx86chipx86

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

chipx86chipx86

Remove the blank line.

chipx86chipx86

is self, probably?

chipx86chipx86

Swap these.

chipx86chipx86

No blank line.

chipx86chipx86

Blank line between these.

chipx86chipx86

Blank line between these.

chipx86chipx86
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)
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
    Show all issues

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

  3. Show all issues

    This blank line should go away too.

  4. Show all issues

    This blank line should go away too

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

    Leftover debug output?

  6. 
      
brennie
chipx86
  1. 
      
  2. Show all issues

    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)
     
     
     
     
     
    Show all issues

    Missing "Args".

  4. Show all issues

    Missing indentation.

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

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

    Remove the blank line.

  6. Show all issues

    is self, probably?

  7. Show all issues

    Swap these.

  8. Show all issues

    No blank line.

  9. Show all issues

    Blank line between these.

  10. Show all issues

    Blank line between these.

  11. 
      
brennie
brennie
david
  1. Ship It!
  2. 
      
brennie
Review request changed
Status:
Completed
Change Summary:
Pushed to release-3.0.x (3d1a32c)