Make a ReviewRequestField for 'status'.
Review Request #7012 — Created March 5, 2015 and submitted
The existing 'status' field is done by directly changing the model, and
recording the change directly into the ChangeDescription. This worked okay,
except that trying to serialize change descriptions which included changes to
the 'status' field would explode.This change adds a new ReviewRequestField (which is not shown in the UI), and
uses that to record the changes to the status, as well as serialize it in the
API. I've added a new unit test that verifies that we can serialize change
descriptions that manipulate the 'status' field.
- Ran unit tests.
- Loaded review requests and saw that there were no changes to the UI.
-
-
reviewboard/reviews/builtin_fields.py (Diff revision 1) I know it doesn't really matter since this field isn't visible, but would this be better suited to the
ChangeEntryOnlyFieldSet
?
Change Summary:
Move StatusField to ChangeEntryOnlyFieldSet.
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 2 (+38 -4) |
-
Tool: Pyflakes Processed Files: reviewboard/reviews/builtin_fields.py reviewboard/webapi/tests/test_change.py reviewboard/reviews/models/review_request.py Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/builtin_fields.py reviewboard/webapi/tests/test_change.py reviewboard/reviews/models/review_request.py
-
-
-
reviewboard/reviews/builtin_fields.py (Diff revision 2) I feel this is useful information for the docstring.
-
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 3 (+42 -4) |
-
Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/builtin_fields.py reviewboard/webapi/tests/test_change.py reviewboard/reviews/models/review_request.py Tool: Pyflakes Processed Files: reviewboard/reviews/builtin_fields.py reviewboard/webapi/tests/test_change.py reviewboard/reviews/models/review_request.py