Make expandedFields a BaseResource concept.

Review Request #4218 — Created June 7, 2013 and submitted — Latest diff uploaded

Information

Review Board
master

Reviewers

Make expandedFields a BaseResource concept.

DraftReviewRequest had a concept of expanding fields in a request by
populating expandedFields. This turns out to be useful elsewhere, so
move this logic out and into BaseResource.

Now, any resource class can set the list of fields to expand, in order
to provide more detailed information or child resources to the callers.
Tested with some upcoming changes that provide sub-models for
related objects.

Unit tests weren't added explicitly for this new functionality, but
some existing tests do cover it, and new tests for the new objects
will as well. We can't easily get in to where jQuery updates the URL
with the options.data stuff, so there's little to really test there.