• 
      

    Fix over-eager deletion with drafts.

    Review Request #13905 — Created May 28, 2024 and submitted — Latest diff uploaded

    Information

    Review Board
    release-7.x

    Reviewers

    When I added change descriptions and diffsets to the draft deletion
    handler, I wasn't thinking about how we delete the draft after
    publishing it. In that case, we've assigned the change description to
    the review request, and assigned the diffset to the history, but we
    haven't cleared them from the draft object. We were therefore deleting
    the data right after we published it.

    This change fixes that up to properly check that those objects are no
    longer alive.

    Unit tests have been added for this case with both of those as well as
    file attachments, which didn't have this same problem because of the way
    we calculate the file attachment state.

    • Ran unit tests.
    • Published a new review request that included a diff and saw that my
      diff wasn't immediately deleted.

    Commits

    Files