Add support for custom fields in extensions.

Review Request #5206 — Created Jan. 7, 2014 and submitted — Latest diff uploaded

Information

Review Board
master

Reviewers

Add support for custom fields in extensions.

This introduces two new hooks: ReviewRequestFieldSetsHook and
ReviewRequestFieldsHook.

ReviewRequestFieldSetsHook allows for the creation of fieldsets, or
sectioned groups of fields on the side of a review request.

ReviewRequestFieldsHook allows for the creation of custom fields in any
fieldset. These fields are stored along with a draft and their history is
tracked in the change descriptions. All fields are also accessible/mutable
through the API by making use of the extra_data support.

Currently, all built-in fields are text-based, but a future change will
allow for more types of fields.

Wrote an extension that made use of different fields, and tested them.

docs/manual/extending/extensions/hooks.txt
reviewboard/extensions/hooks.py
reviewboard/reviews/fields.py
reviewboard/reviews/views.py
reviewboard/static/rb/css/reviews.less
reviewboard/static/rb/js/models/reviewRequestEditorModel.js
reviewboard/static/rb/js/models/tests/reviewRequestEditorModelTests.js
reviewboard/static/rb/js/resources/models/draftReviewRequestModel.js
reviewboard/static/rb/js/views/reviewRequestEditorView.js
reviewboard/static/rb/js/views/tests/reviewRequestEditorViewTests.js
reviewboard/templates/reviews/review_header.html
reviewboard/templates/reviews/review_request_box.html
Loading...