Fix always creating new comments with Open Issue checked.
Review Request #6978 — Created Feb. 26, 2015 and submitted — Latest diff uploaded
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.