Cache comment issue counts on ReviewRequest.
Review Request #5280 — Created Jan. 20, 2014 and submitted
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.
- Change Summary:
-
- Fixed some typos/misspellings.
- Enhanced the tests to make sure there's only one query fetch (+ 1 update) per review request, instead of per field.
- Diff:
-
Revision 2 (+280 -14)