Fixed a bug where "Start Over" in Update Diff creates a new review request.
Review Request #8402 — Created Sept. 17, 2016 and submitted
Uploading a bad Diff in the UpdateDiff window causes a Start Over window.
When starting over, a valid diff creates a new review instead of updating.Fixed by removing code that set the review request number to null.
The request number is now properly retained and no new review is created.
Testing done via reaching Start Over message, then uploading a proper diff.
All results ended with the review being properly updated.Tested invalid, unparsable and empty files to reach the "Start Over" page.
Tested (via modifying the code) to directly land on the "Start Over" page.
Tested uploading multiple incorrect files then a correct file.
Tested with multiple diff files.
Tested both by using the 'Select a diff' option and clicking and dragging.
Tested on both the Update page menu and the "New Review Request" page.
Tested via Jasmine that StartOver doesn't change reviewRequest.
All tests done on Firefox 48.0, Reviewboard 2.5.x and Python2.7.12
Description | From | Last Updated |
---|---|---|
A couple comments I'm making on everyone's changes (this is pretty common for the initial review requests): 1) Your Description … |
chipx86 | |
Your testing mentions Review Board 2.6, which isn't a thing. Did you mean 2.5? The branch still lists "master". |
chipx86 | |
This model is also used on the "New Review Request" page. Can you verify that "Start Over" still works correctly … |
david | |
I don't think this is the right fix. We want defaults for every attribute in the model. It seems more … |
chipx86 | |
One space before function() |
mike_conley | |
It would be nice to use " instead of \' |
david | |
It would be nice to put the .and.callThrough(...) on the next line to keep things close to 80 characters in … |
david | |
Busted indentation in here, I think. |
mike_conley | |
It looks like the first-level things are only indented 3 spaces instead of 4. Please make sure that all indentation … |
david | |
Can you format this as one variable per line? var reviewRequest, reviewRequestEditor; |
david | |
This needs to be specified in the var statement above. Otherwise you're creating a new global variable. |
david | |
When writing ES5, we merge everything into a single var statement, like this: var priorRequest = reviewRequest, model; That said, … |
david | |
There's an extra blank line here. |
david | |
Can you undo this change? |
david | |
This doesn't seem to be testing anything--you assign the priorRequest variable once, and then test it against what you assigned … |
david | |
Switch quotes around here. |
brennie |
- Summary:
-
Fixed Error#4404 by removing code that set the reviewquest number to null accidentallyFixed a bug caused clicking 'Start Over' in 'Update Diff' window.
- Description:
-
~ Fixed Error#4404 by removing code that set the reviewrequest number to null accidentally when pressing the "Start Over" button.
~ Uploading an invalid Diff in the Update Diff window causes a 'Start Over' window to be displayed. Pressing 'Start Over' then uploading any valid diff creates a new review as opposed to properly updating the current one.
+ + This was fixed by removing code that set the review request number to null when pressing the "Start Over" button. The code now properly retains the request number and thus does not create a new review.
- Bugs:
- Testing Done:
-
Testing done by reaching the "Start Over" message, clicking it and then uploading a proper diff. All results ended with the review being properly updated.
Tested invalid, unparsable and empty files to reach the "Start Over" page. Tested (via modifying the code) to directly land on the "Start Over" page. Tested uploading multiple incorrect files then a correct file. Tested with multiple diff files. Tested both by using the 'Select a diff' option and clicking and dragging. + Tested on both the Update page menu and the "New Review Request" page. All tests done on Firefox 48.0, Reviewboard 2.6 and Python2.7.12
-
-
I don't think this is the right fix. We want defaults for every attribute in the model. It seems more like the dialog has the proper state initially, but some state is missing when clicking Start Over. That should be fixed.
A unit test will need to be written for the resulting fix, to ensure that the resulting state is correct after clicking Start Over.
-
-
A couple comments I'm making on everyone's changes (this is pretty common for the initial review requests):
1) Your Description and Testing Done should wrap at around 75 characters on each line. This helps when we turn these into commits, since Git commits should usually be no more than around 75 characters per line. This applies to the summary as well (which I know can be hard, and it's okay if this goes up to 79). A good way to ensure this is to make sure your editor is set to wrap lines at 75 characters when editing a git commit message.
2) The Summary should be more explicit. It reads that a bug caused "Start Over" to be clicked in "Update Diff," which isn't what you meant. Something better might be:
Fixed a bug where "Start Over" in Update Diff creates a new review request.
- Summary:
-
Fixed a bug caused clicking 'Start Over' in 'Update Diff' window.Fixed a bug where "Start Over" in Update Diff creates a new review request.
- Description:
-
~ Uploading an invalid Diff in the Update Diff window causes a 'Start Over' window to be displayed. Pressing 'Start Over' then uploading any valid diff creates a new review as opposed to properly updating the current one.
~ Uploading a bad Diff in the UpdateDiff window causes a Start Over window.
+ When starting over, a valid diff creates a new review instead of updating. ~ This was fixed by removing code that set the review request number to null when pressing the "Start Over" button. The code now properly retains the request number and thus does not create a new review.
~ Fixed by removing code that set the review request number to null.
+ The request number is now properly retained and no new review is created. - Testing Done:
-
~ Testing done by reaching the "Start Over" message, clicking it and then uploading a proper diff. All results ended with the review being properly updated.
~ Tested invalid, unparsable and empty files to reach the "Start Over" page. ~ Testing done via reaching Start Over message, then uploading a proper diff.
~ All results ended with the review being properly updated. + + Tested invalid, unparsable and empty files to reach the "Start Over" page.
Tested (via modifying the code) to directly land on the "Start Over" page. Tested uploading multiple incorrect files then a correct file. Tested with multiple diff files. Tested both by using the 'Select a diff' option and clicking and dragging. Tested on both the Update page menu and the "New Review Request" page. + Tested via Jasmine that StartOver doesn't change reviewRequest. All tests done on Firefox 48.0, Reviewboard 2.6 and Python2.7.12 - Commit:
-
0c883cf434066150e828f8de9bfb29235104b17cc171092f7641182efb5877f8f76a0427a755c8fa
-
Tool: Pyflakes Processed Files: reviewboard/staticbundles.py Ignored Files: reviewboard/static/rb/js/models/uploadDiffModel.js reviewboard/static/rb/js/models/tests/uploadDiffModelTests.js Tool: PEP8 Style Checker Processed Files: reviewboard/staticbundles.py Ignored Files: reviewboard/static/rb/js/models/uploadDiffModel.js reviewboard/static/rb/js/models/tests/uploadDiffModelTests.js
- Testing Done:
-
Testing done via reaching Start Over message, then uploading a proper diff.
All results ended with the review being properly updated. Tested invalid, unparsable and empty files to reach the "Start Over" page.
Tested (via modifying the code) to directly land on the "Start Over" page. Tested uploading multiple incorrect files then a correct file. Tested with multiple diff files. Tested both by using the 'Select a diff' option and clicking and dragging. Tested on both the Update page menu and the "New Review Request" page. Tested via Jasmine that StartOver doesn't change reviewRequest. ~ All tests done on Firefox 48.0, Reviewboard 2.6 and Python2.7.12 ~ All tests done on Firefox 48.0, Reviewboard 3.0 and Python2.7.12
- Change Summary:
-
Rebased change from release-3.0.x to release-2.5.x. Fixed formatting errors.
- Testing Done:
-
Testing done via reaching Start Over message, then uploading a proper diff.
All results ended with the review being properly updated. Tested invalid, unparsable and empty files to reach the "Start Over" page.
Tested (via modifying the code) to directly land on the "Start Over" page. Tested uploading multiple incorrect files then a correct file. Tested with multiple diff files. Tested both by using the 'Select a diff' option and clicking and dragging. Tested on both the Update page menu and the "New Review Request" page. Tested via Jasmine that StartOver doesn't change reviewRequest. ~ All tests done on Firefox 48.0, Reviewboard 3.0 and Python2.7.12 ~ All tests done on Firefox 48.0, Reviewboard 2.5.x and Python2.7.12 - Branch:
-
masterrelease-2.5.x
- Commit:
-
c171092f7641182efb5877f8f76a0427a755c8fa368dbee95aac09e5899ce51583081fd572a13024
-
Tool: PEP8 Style Checker Processed Files: reviewboard/staticbundles.py Ignored Files: reviewboard/static/rb/js/models/uploadDiffModel.js reviewboard/static/rb/js/models/tests/uploadDiffModelTests.js Tool: Pyflakes Processed Files: reviewboard/staticbundles.py Ignored Files: reviewboard/static/rb/js/models/uploadDiffModel.js reviewboard/static/rb/js/models/tests/uploadDiffModelTests.js
-
-
It looks like the first-level things are only indented 3 spaces instead of 4. Please make sure that all indentation are multiples of 4.
-
-
This needs to be specified in the
var
statement above. Otherwise you're creating a new global variable. -
When writing ES5, we merge everything into a single
var
statement, like this:var priorRequest = reviewRequest, model;
That said, it probably makes sense to define
model
inline in the call-through function (var model = options.model;
) rather than here in the containing function. -
-
- Change Summary:
-
Fixed formatting errors.
- Commit:
-
368dbee95aac09e5899ce51583081fd572a13024d949da229c782b9087fab6c0e5f37848f44c66e3
-
Tool: Pyflakes Processed Files: reviewboard/staticbundles.py Ignored Files: reviewboard/static/rb/js/models/uploadDiffModel.js reviewboard/static/rb/js/models/tests/uploadDiffModelTests.js Tool: PEP8 Style Checker Processed Files: reviewboard/staticbundles.py Ignored Files: reviewboard/static/rb/js/models/uploadDiffModel.js reviewboard/static/rb/js/models/tests/uploadDiffModelTests.js
- Change Summary:
-
Completely rewrote testing function to properly verify that that review request is not modified by the startOver function.
- Commit:
-
d949da229c782b9087fab6c0e5f37848f44c66e376fba7bf295888278e60cac1c483532077d77ce8
-
Tool: Pyflakes Processed Files: reviewboard/staticbundles.py Ignored Files: reviewboard/static/rb/js/models/uploadDiffModel.js reviewboard/static/rb/js/models/tests/uploadDiffModelTests.js Tool: PEP8 Style Checker Processed Files: reviewboard/staticbundles.py Ignored Files: reviewboard/static/rb/js/models/uploadDiffModel.js reviewboard/static/rb/js/models/tests/uploadDiffModelTests.js
- Change Summary:
-
Switched quoutes around
- Commit:
-
76fba7bf295888278e60cac1c483532077d77ce8fa15150036dd21bdba996da0b66d560853eee0e6
-
Tool: Pyflakes Processed Files: reviewboard/staticbundles.py Ignored Files: reviewboard/static/rb/js/models/uploadDiffModel.js reviewboard/static/rb/js/models/tests/uploadDiffModelTests.js Tool: PEP8 Style Checker Processed Files: reviewboard/staticbundles.py Ignored Files: reviewboard/static/rb/js/models/uploadDiffModel.js reviewboard/static/rb/js/models/tests/uploadDiffModelTests.js