• 
      

    Fix a major regression in comment ordering.

    Review Request #8739 — Created Feb. 11, 2017 and submitted

    Information

    Review Board
    release-2.0.x
    166c15d...

    Reviewers

    A recent change going into 2.0.26 and 2.5.8 broke comment ordering,
    causing them to be ordered by ID and not timestamp. This could greatly
    alter reading and composing a review, along with API results. The cause
    was the subclasses of BaseComment introducing a Meta that overrode the
    one from the parent, instead of subclassing it.
    
    This fixes that by subclassing the parent's meta, inheriting the
    ordering. It also removes the app_labels, which were already provided by
    the parent.

    Unit tests pass.

    No longer saw the comment ordering problem in tests.

    reviewbot
    1. Tool: Pyflakes
      Processed Files:
          reviewboard/reviews/models/file_attachment_comment.py
          reviewboard/reviews/models/diff_comment.py
          reviewboard/reviews/models/screenshot_comment.py
      
      
      
      Tool: PEP8 Style Checker
      Processed Files:
          reviewboard/reviews/models/file_attachment_comment.py
          reviewboard/reviews/models/diff_comment.py
          reviewboard/reviews/models/screenshot_comment.py
      
      
    2. 
        
    mike_conley
    1. Good catch. Are we going to need this for GeneralComment on the branches that have it?

      Also, I'm kinda surprised we don't have tests on ordering... :/

      1. We did. I don't know how it slipped by. I noticed it after the release...

        Going to be bullet-proofing things soon so all releases require all tests to pass, rather than that being a manual step. Also, new CI is almost ready.

    2. 
        
    david
    1. Ship It!
    2. 
        
    chipx86
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-2.0.x (2ce15eb)