Fix always creating new comments with Open Issue checked.

Review Request #6978 — Created Feb. 26, 2015 and submitted

Information

Review Board
release-2.0.x
b02cc5a...

Reviewers

The comment dialog recently started unconditionally starting new comment
with the Open Issue checkbox checked. This was happening due to a
regression from a recent fix to some of this logic, which was actually
exposing some bad defaults we previously had. Comments had issueOpened
set to true by default, instead of allowing that default to be computed
later on.

We now set the default to null. When creating a new comment, it will
then be set based off the user preference.

Unit tests pass.

Had my issueOpened preference set to true by default. Created a new comment
and saw that the checkbox was checked. Saved it and verified the right state
was set.

Turned off the preference. Created a new comment and saw that it was unchecked.
Saved it and verified the resulting state.

Tested both preferences with existing draft comments. The comment always had
the existing state.

reviewbot
  1. Tool: Pyflakes
    Ignored Files:
        reviewboard/static/rb/js/resources/models/baseCommentModel.js
        reviewboard/static/rb/js/resources/models/tests/baseCommentModelTests.js
    
    
    
    Tool: PEP8 Style Checker
    Ignored Files:
        reviewboard/static/rb/js/resources/models/baseCommentModel.js
        reviewboard/static/rb/js/resources/models/tests/baseCommentModelTests.js
    
    
  2. 
      
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-2.0.x (e00af24)
Loading...