Fix openIssue checkbox set to default when reloading the page with explicitly set value
Review Request #6867 — Created Feb. 1, 2015 and submitted
In the "View Diff" page, click one line in diff content to open one comment dialog
and create one comment WITHOUT issue opened. And reload that view diff page, click
the flag of that comment we just created, the "IssueOpened" checkbox is checked in
the dialog. Close it and reopen it again, the checked status is OK.Since the status setting is missed, we set the issueOpened status and issued status
when creating the draftcomment in the comment block.
Added a unit test, which passes along with all other tests.
Tested with a commentEditor which contains a comment whose 'loaded' attribute and
'issueOpened' attribute are false and the default setting is true. Previously, the
editor's 'openIssue' attribute is true. After, the attribute will set to user's setting
with the patch.Test for some cases, all passed.
Description | From | Last Updated |
---|---|---|
Let's break up this long line - maybe after comment.text,, like: this.ensureDraftComment(comment.comment_id, comment.text, comment.issue_opened, comment.issue_status); |
mike_conley | |
We might want to check for the presence of issue_opened and issue_status. We seem to do the same for text, … |
mike_conley | |
Can you remove the trailing whitespace on this line? (Any trailing whitespace is always highlighted in red in the diff … |
anselina | |
If w're modifying this function signature, maybe instead we want to just pass a dictionary of attributes to set. We … |
chipx86 | |
Blank line between these. |
chipx86 | |
Blank line between these. |
chipx86 | |
In JavaScript, you actually want to use ===. That is a strict comparison, whereas == will try casting to equivalent … |
chipx86 | |
var statements should go at the top of hte function. |
chipx86 | |
This should happen at the top of the function (before the // We load in ... comment). We define all … |
david |
- Description:
-
Fix Bug #3580
Add openIssue part Javascript Test for bug #3580 Bug Description
- In the "View Diff" page, click one line in diff content to open one comment dialog
- Create one comment WITHOUT issue opened
- Reload that view diff page
- Click the flag of that comment we just created, you could see the "IssueOpened" checkbox is checked in the dialog
- Close the dialog and reopen it again
- This time the checked status is OK
~ Fixtion Detail
~ Fixation Detail
- Modify the time setting the openIssue to default when the attribute openIssue is null not loaded is false
- Modify the function ensureDraftComment header
-
-
Let's break up this long line - maybe after
comment.text,
, like:this.ensureDraftComment(comment.comment_id, comment.text, comment.issue_opened, comment.issue_status);
-
We might want to check for the presence of issue_opened and issue_status. We seem to do the same for text, so might as well follow the pattern.
- Groups:
-
Hey Mingyi, just a reminder to address the issues that I opened. Also, please mark them "Fixed" as you address them. Thanks!
-
Make sure to read through the guide on writing summaries and descriptions :) - https://www.reviewboard.org/docs/codebase/dev/writing-good-descriptions/
- Change Summary:
-
- Break up the calling long line
- Add if condition statement
- Summary:
-
Bug Fix #3580: IssueOpen ProblemFix openIssue checkbox set to default when reloading the page with explicitly set value
- Description:
-
~ Fix Bug #3580
~ Add openIssue part Javascript Test for bug #3580 ~ In the "View Diff" page, click one line in diff content to open one comment dialog
~ and create one comment WITHOUT issue opened. And reload that view diff page, click + the flag of that comment we just created, the "IssueOpened" checkbox is checked in + the dialog. Close it and reopen it again, the checked status is OK. ~ Bug Description
~ ~ Since the status setting is missed, we set the issueOpened status and issued status
~ when creating the draftcomment in the comment block. - - In the "View Diff" page, click one line in diff content to open one comment dialog
- - Create one comment WITHOUT issue opened
- - Reload that view diff page
- - Click the flag of that comment we just created, you could see the "IssueOpened" checkbox is checked in the dialog
- - Close the dialog and reopen it again
- - This time the checked status is OK
- - Fixation Detail
- - - Modify the time setting the openIssue to default when the attribute openIssue is null not loaded is false
- - Modify the function ensureDraftComment header
- Testing Done:
-
~ Add an js test in the openIssue part
~ Added a unit test, which passes along with all other tests.
~ All js-test passed
~ Tested with a commentEditor which contains a comment whose 'loaded' attribute and
+ 'issueOpened' attribute are false and the default setting is true. Previously, the + editor's 'openIssue' attribute is true. After, the attribute will set to user's setting + with the patch. + + Test for some cases, all passed.
- Commit:
-
3066f4225233e3da8cf42c6cdbc394e0c9aafdb6345b5b60df34b3ddc4c92f7d3b9f54472875846e
-
Tool: PEP8 Style Checker Ignored Files: reviewboard/static/rb/js/models/abstractCommentBlockModel.js reviewboard/static/rb/js/models/commentEditorModel.js reviewboard/static/rb/js/models/tests/commentEditorModelTests.js Tool: Pyflakes Ignored Files: reviewboard/static/rb/js/models/abstractCommentBlockModel.js reviewboard/static/rb/js/models/commentEditorModel.js reviewboard/static/rb/js/models/tests/commentEditorModelTests.js
- Change Summary:
-
Remove extra blanks.
- Commit:
-
345b5b60df34b3ddc4c92f7d3b9f54472875846ecdd36d292d07d6bfbb5ae13ec4a7732d157ad7ca
-
Tool: Pyflakes Ignored Files: reviewboard/static/rb/js/models/abstractCommentBlockModel.js reviewboard/static/rb/js/models/commentEditorModel.js reviewboard/static/rb/js/models/tests/commentEditorModelTests.js Tool: PEP8 Style Checker Ignored Files: reviewboard/static/rb/js/models/abstractCommentBlockModel.js reviewboard/static/rb/js/models/commentEditorModel.js reviewboard/static/rb/js/models/tests/commentEditorModelTests.js
- Change Summary:
-
- Change func ensureDraftComment header, pass dict instead
- '===' means equals to
- Move var define to the top
- Bugs:
-
- Commit:
cdd36d292d07d6bfbb5ae13ec4a7732d157ad7ca6530a66069d905944c1b0c749cb840d0ebdd98bb
-
Tool: Pyflakes Ignored Files: reviewboard/static/rb/js/models/abstractCommentBlockModel.js reviewboard/static/rb/js/models/commentEditorModel.js reviewboard/static/rb/js/models/tests/commentEditorModelTests.js Tool: PEP8 Style Checker Ignored Files: reviewboard/static/rb/js/models/abstractCommentBlockModel.js reviewboard/static/rb/js/models/commentEditorModel.js reviewboard/static/rb/js/models/tests/commentEditorModelTests.js
- Change Summary:
-
Move defination place.
- Commit:
-
6530a66069d905944c1b0c749cb840d0ebdd98bb29720ca74d3e9299dbcca63d36d108cd3c4621eb
-
Tool: Pyflakes Ignored Files: reviewboard/static/rb/js/models/abstractCommentBlockModel.js reviewboard/static/rb/js/models/commentEditorModel.js reviewboard/static/rb/js/models/tests/commentEditorModelTests.js Tool: PEP8 Style Checker Ignored Files: reviewboard/static/rb/js/models/abstractCommentBlockModel.js reviewboard/static/rb/js/models/commentEditorModel.js reviewboard/static/rb/js/models/tests/commentEditorModelTests.js