Cache comment issue counts on ReviewRequest.

Review Request #5280 — Created Jan. 20, 2014 and submitted

Information

Review Board
master

Reviewers

ReviewRequest now has three new counters for tracking the number of
issue states across all comments made on the review request.

These default to None for all existing review requests. When a review
request is accessed, all its counter fields will be initialized in one
go. Any time the state of an issue on a public review is changed,
the counter will be updated.

This will be used in future changes for the API and for the dashboard.

Unit tests pass.

Checked the counters on a loaded object with and without issues.

Toggled issues to various states and checked the counters. They reflected
the correct states.

Description From Last Updated

Atomically

daviddavid

and

daviddavid
david
  1. 
      
  2. reviewboard/reviews/models/review.py (Diff revision 1)
     
     
    Show all issues

    Atomically

  3. Show all issues

    and

  4. reviewboard/reviews/models/review_request.py (Diff revision 1)
     
     
     
     
     
     
     
     
     
     

    Did you test to make sure this is only one query? If not, can you?

  5. 
      
chipx86
david
  1. Your bug number is nonsense.

    1. Oops, that was supposed to be Depends On.

  2. 
      
chipx86
chipx86
Review request changed

Status: Closed (submitted)

Loading...