-
-
reviewboard/static/rb/js/models/uploadDiffModel.js (Diff revision 1) This model is also used on the "New Review Request" page. Can you verify that "Start Over" still works correctly there?
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: |
|
||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description: |
|
||||||||||||
Bugs: |
|
Testing Done: |
|
---|
-
-
reviewboard/static/rb/js/models/uploadDiffModel.js (Diff revision 1) 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: |
|
|||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description: |
|
|||||||||||||||||||||||||||||||||||||||
Testing Done: |
|
|||||||||||||||||||||||||||||||||||||||
Commit: |
|
|||||||||||||||||||||||||||||||||||||||
Diff: |
Revision 2 (+31 -1) |
-
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: |
|
---|
-
-
reviewboard/static/rb/js/models/tests/uploadDiffModelTests.js (Diff revision 2) One space before function()
-
reviewboard/static/rb/js/models/tests/uploadDiffModelTests.js (Diff revision 2) Busted indentation in here, I think.
-
Can you rebase this change onto release-2.5.x?
-
reviewboard/static/rb/js/models/tests/uploadDiffModelTests.js (Diff revision 2) It would be nice to use
"
instead of\'
-
reviewboard/static/rb/js/models/tests/uploadDiffModelTests.js (Diff revision 2) It would be nice to put the
.and.callThrough(...)
on the next line to keep things close to 80 characters in width.
Change Summary:
Rebased change from release-3.0.x to release-2.5.x. Fixed formatting errors.
Testing Done: |
|
||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Branch: |
|
||||||||||||||||||||||||||||||||||||
Commit: |
|
||||||||||||||||||||||||||||||||||||
Diff: |
Revision 3 (+33 -1) |
-
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
-
-
reviewboard/static/rb/js/models/tests/uploadDiffModelTests.js (Diff revision 3) 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.
-
reviewboard/static/rb/js/models/tests/uploadDiffModelTests.js (Diff revision 3) Can you format this as one variable per line?
var reviewRequest, reviewRequestEditor;
-
reviewboard/static/rb/js/models/tests/uploadDiffModelTests.js (Diff revision 3) This needs to be specified in the
var
statement above. Otherwise you're creating a new global variable. -
reviewboard/static/rb/js/models/tests/uploadDiffModelTests.js (Diff revision 3) 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. -
reviewboard/static/rb/js/models/tests/uploadDiffModelTests.js (Diff revision 3) There's an extra blank line here.
-
Change Summary:
Fixed formatting errors.
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 4 (+32 -1) |
-
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
-
-
reviewboard/static/rb/js/models/tests/uploadDiffModelTests.js (Diff revision 4) This doesn't seem to be testing anything--you assign the
priorRequest
variable once, and then test it against what you assigned to it. That can never fail.I think what you ought to be checking is
expect(model.get('reviewRequest').toBe(reviewRequest)
Change Summary:
Completely rewrote testing function to properly verify that that review request is not modified by the startOver function.
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 5 (+29 -1) |
-
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
-
-
reviewboard/static/rb/js/models/tests/uploadDiffModelTests.js (Diff revision 5) Switch quotes around here.
Change Summary:
Switched quoutes around
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 6 (+29 -1) |
-
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