Don't reset the Enable Markdown checkbox when re-opening a comment.

Review Request #7068 — Created March 16, 2015 and submitted

Information

Review Board
release-2.0.x
c315745...

Reviewers

When saving a comment in the diff viewer and re-opening it, we ended up
setting the Enable Markdown checkbox to the default value for the model
and not the value stored in the comment.

We now do what we did for the Open Issue checkbox. The default is null,
and in the case of null, we re-query based on the comment's value,
falling back on the default for the user.

Unit tests pass.

I created a comment with Markdown enabled (my default) and saved it.
Verified the value in the database.

I then re-opened the comment, toggled the checkbox off, and saved it.
Verified the value in the database. Re-opened again and saw that it
was still unchecked.

Re-enabled and verified.

I also checked that the escaping was correct in the Review dialog based
on the checkbox.

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

Status: Closed (submitted)

Change Summary:

Pushed to release-2.0.x (1f365cf)
Loading...