Refactor queries for the review request page.
Review Request #8347 — Created Aug. 25, 2016 and submitted — Latest diff uploaded
This change moves all the data querying logic out of the review_detail view
into a newReviewRequestPageData
object. The view itself is now primarily
concerned with computation of the etag, creation of the entries, and rendering
of the template--as it should be. This new object documents its attributes, and
is passed into the builtin fields which wish to use it to optimize their
queries, rather than the oldlocals_vars
hack, which I believe was possibly
literally one of the gateways to hell.As I was doing this I cleaned up some code which was no longer used and moved
some of the work from pre-etag to post-etag. This also changes some of the
timestamp comparisons to work off of integers (ctimes) instead of datetimes,
since before we had a few instances where we were comparing datetimes to 0.
- Did lots of testing with a few different review requests with lots of change
description and review boxes. - Ran unit tests.