Make expandedFields a BaseResource concept.

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

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.
reviewbot
  1. This is a review from Review Bot.
      Tool: PEP8 Style Checker
      Processed Files:
      Ignored Files:
        reviewboard/static/rb/js/models/draftReviewRequestModel.js
        reviewboard/static/rb/js/models/baseResourceModel.js
    
    
  2. 
      
david
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed