Copy over draft information on an unpublished private review request discard
Review Request #6748 — Created Jan. 8, 2015 and submitted
If you create a new review request, fill out the description, testing done, etc. information, and then discard it without publishing, the information that you filled out will no longer be in the review request. With this fix, the draft information is copied over on private unpublished review requests.
- All existing unit tests were run and passed.
- Added two unit tests to check behaviour of discarding a private unpublished review request (this one should have the change description updated based on the request draft) and discarding a public unpublished review request (this should not have the change description updated and behaves like it used to).
- Manually tested combinations of: filling out the information (description, testing done, file attachments) of a new review request, discarding it, reopening it, modifying/not modifying fields, and discarding it again.
Description | From | Last Updated |
---|---|---|
This can be replaced with one line, which will do a more efficient database query: latest_changedesc = \ review_request.changedescs.filter(public=True).latest() |
david | |
This can be replaced with one line, which will do a more efficient database query: latest_changedesc = \ review_request.changedescs.filter(public=True).latest() |
david |
-
-
This can be replaced with one line, which will do a more efficient database query:
latest_changedesc = \ review_request.changedescs.filter(public=True).latest()
-
This can be replaced with one line, which will do a more efficient database query:
latest_changedesc = \ review_request.changedescs.filter(public=True).latest()
- Change Summary:
-
Updating based on David's feedback
- Commit:
-
70e21d600c0be11b6c32abe7fb3376deda4493ecbad180253c493645cfccfc2dc5a0c21cad499057
-
Tool: Pyflakes Processed Files: reviewboard/reviews/tests.py reviewboard/reviews/models/review_request_draft.py reviewboard/reviews/models/review_request.py Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/tests.py reviewboard/reviews/models/review_request_draft.py reviewboard/reviews/models/review_request.py