• 
      

    Rework and fix text types for custom fields.

    Review Request #6530 — Created Oct. 29, 2014 and submitted — Latest diff uploaded

    Information

    Review Board
    release-2.0.x
    417fdd1...

    Reviewers

    Custom review request fields were pretty broken. We tried to write the
    <fieldname>_rich_text= value in requests, but had a bug causing the
    wrong key to be generated.

    This was also designed in a way that resulted in some inconsistencies
    with the rest of the API, with the goal of making things consistent with
    the database models. Instead of accepting a text_type= string in
    requests, we'd accept a rich_text= boolean, which differed from other
    text fields.

    The API would still return a custom text_type= value in the extra_data
    payload, to help, but that would sit along the rich_text=, and would be
    inconsistent when forcing text types.

    We now use text_type everywhere. Things are much simpler now.

    Unit tests pass.

    Tried changing values for a custom field in the UI. Saw that the proper
    values were saved to the database, and that they were used as a basis
    for rendering when forcing text types in a request.