Add support for fine-grained rich text for custom fields.

Review Request #6463 — Created Oct. 18, 2014 and submitted

Information

Review Board
release-2.0.x
6ff2f0f...

Reviewers

Custom fields now work properly with fine-grained rich text fields.
When loading an old field, the rich text setting won't exist in
extra_data, so we assume rich_text should be true. This is because in
2.0.x, pre-2.0.9, all fields were saved as Markdown by default.

When saving a field, we now set the appropriate rich_text field along
with it, and when loading, we look for that field. We also escape if it
exists and is set to False.

Loaded an old review request with the Note to Reviewers field. Saw that it
appeared as rendered Markdown, despite not having the rich_text value.

Saved the text and saw it render as Markdown and save the rich_text value.

Tweaked that value to false in the database. Loaded and saw it appear as
escaped Markdown text. Saving again turned it into Markdown.

reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/webapi/base.py
        reviewboard/reviews/fields.py
        reviewboard/webapi/mixins.py
    
    Ignored Files:
        reviewboard/static/rb/js/models/reviewRequestEditorModel.js
        reviewboard/static/rb/js/views/reviewRequestEditorView.js
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/webapi/base.py
        reviewboard/reviews/fields.py
        reviewboard/webapi/mixins.py
    
    Ignored Files:
        reviewboard/static/rb/js/models/reviewRequestEditorModel.js
        reviewboard/static/rb/js/views/reviewRequestEditorView.js
    
    
  2. 
      
chipx86
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/webapi/base.py
        reviewboard/webapi/tests/mixins_extra_data.py
        reviewboard/reviews/fields.py
        reviewboard/webapi/mixins.py
    
    Ignored Files:
        reviewboard/static/rb/js/models/reviewRequestEditorModel.js
        reviewboard/static/rb/js/views/reviewRequestEditorView.js
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/webapi/base.py
        reviewboard/webapi/tests/mixins_extra_data.py
        reviewboard/reviews/fields.py
        reviewboard/webapi/mixins.py
    
    Ignored Files:
        reviewboard/static/rb/js/models/reviewRequestEditorModel.js
        reviewboard/static/rb/js/views/reviewRequestEditorView.js
    
    
  2. 
      
david
  1. Ship It!

  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to markdown-redesign (673228a)