• 
      

    Fix serialization of text types in list resources.

    Review Request #14658 — Created Oct. 28, 2025 and submitted

    Information

    Djblets
    release-5.x

    Reviewers

    When fetching a list resource, the serialize_object_list was calling
    serialize_object for each item in the list but passing the request as
    a positional argument instead of a keyword argument. This works fine for
    just about everything, but the current implementation of Review Board's
    MarkdownFieldsMixin attempts to pull the request out of a kwargs dict,
    and so it was failing to find it, resulting in a serialized payload that
    did not include any of the requested text types.

    The result of this was that the review dialog was not able to access the
    raw (or even rendered) text for comments, and so clicking edit on a
    comment would open up a blank editor. This bug seems likely to have been
    exposed when we changed the inline editors in the review dialog to
    use the new (non-jquery-ui) implementation for inline editors, which
    also streamlined the way we fetch the comment data.

    Ideally we should fix up every version of serialize_object to enforce
    that the request parameter is a kwarg, but that's a much larger change
    across multiple codebases, so I wanted to fix the bug in isolation
    first.

    Opened the review dialog with an existing review and was able to edit
    comments properly.

    Summary ID
    Fix serialization of text types in list resources.
    When fetching a list resource, the `serialize_object_list` was calling `serialize_object` for each item in the list but passing the request as a positional argument instead of a keyword argument. This works fine for just about everything, but the current implementation of Review Board's `MarkdownFieldsMixin` attempts to pull the request out of a kwargs dict, and so it was failing to find it, resulting in a serialized payload that did not include any of the requested text types. The result of this was that the review dialog was not able to access the raw (or even rendered) text for comments, and so clicking edit on a comment would open up a blank editor. This bug seems likely to have been exposed when we changed the inline editors in the review dialog to use the new (non-jquery-ui) implementation for inline editors, which also streamlined the way we fetch the comment data.o Ideally we should fix up every version of `serialize_object` to enforce that the request parameter is a kwarg, but that's a much larger change across multiple codebases, so I wanted to fix the bug in isolation first. Testing Done: Opened the review dialog with an existing review and was able to edit comments properly.
    rrqvunpvoztsvskoszzzrvuqnqqkostv
    Description From Last Updated

    Typo at the end of the second paragraph: "data.o"

    chipx86chipx86
    maubin
    1. Ah forgot about this bug, thanks for fixing it.

    2. 
        
    chipx86
    1. 
        
    2. Show all issues

      Typo at the end of the second paragraph: "data.o"

    3. 
        
    david
    david
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-5.x (bda59e5)