Represent all custom fields in the Change resource in the API.

Review Request #6887 — Created Feb. 1, 2015 and submitted — Latest diff uploaded

Information

Review Board
release-2.0.x
9cd3d58...

Reviewers

The Change resource was hard-coding support for a number of built-in
fields, and wasn't even getting all of them. It was never updated to
take into account any registered fields. Now, instead of using a bunch
of custom logic in the resource, it iterates through all change entries,
locates a matching field (if any), and serializes that.

This also gets rid of some bad, broken caching that could both cause
results to contain stale information from the database and could cause
memory bloat if traversing a large number of Change resources. It does
mean there's a performance hit in the database with repeated calls, but
HTTP caching should help with that. Some queries were also optimized to
reduce the number of hits to the database. Overall, it should be a
performance win.

Unit tests pass.

No longer saw stale payloads.