Fix change numbers and commit IDs not appearing on review requests.
Review Request #8609 — Created Jan. 11, 2017 and submitted
We had a regression a few releases ago where change numbers/commit IDs were being stored solely on a draft and not on a review request, preventing those change numbers/commit IDs from being returned in conflict error responses or matching properly when posting a change for review. This was largely a problem with Perforce. The workflow for Perforce is to use RBTools to post a change number. If that change number is already posted, the review request matching it is returned, and RBTools then extracts the change number for use in subsequent requests. However, this was no longer being set on the review request, so it was coming back as a null value. We now always set this on the review request itself, updating both the commit ID and the change number. This happens on the initial save, before we even try to update the draft based on that commit ID/change number. This value is still cleared as expected when discarding the review request.
Tested manually and verified that posting a change for review using
an existing change number now updates the correct review request again.
Verified it was broken before.Tested manually that Perforce changes show "pending" when the change is
pending, and don't when it's not, fixing bug #4484.Unit tests pass.
Description | From | Last Updated |
---|---|---|
Use <URL> and the @webapi_test_template decorator?? |
brennie |
- Change Summary:
-
Updated a test to use
@webapi_test_template
. - Testing Done:
-
Tested manually and verified that posting a change for review using
an existing change number now updates the correct review request again. Verified it was broken before. + Tested manually that Perforce changes show "pending" when the change is
+ pending, and don't when it's not, fixing bug #4484. + Unit tests pass.
- Bugs:
-
- Commit:
177a51177697d9ceb98ad8485e87ca2122177bbb7463d2d469aefb061161bb4649be80c218a05c48
-
Tool: Pyflakes Processed Files: reviewboard/reviews/tests/test_review_request_manager.py reviewboard/webapi/tests/test_review_request.py reviewboard/reviews/managers.py Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/tests/test_review_request_manager.py reviewboard/webapi/tests/test_review_request.py reviewboard/reviews/managers.py