• 
      

    Fix next/prev file attachments when Review UIs are unavailable.

    Review Request #14022 — Created July 11, 2024 and submitted

    Information

    Review Board
    release-7.x

    Reviewers

    The next and previous file attachment pop-outs were broken if an
    attachment either did not have a Review UI, or had a Review UI which was
    not available. This change makes it so we check to ensure that the link
    will lead to a working page, and skip over any attachments that won't.

    Created a series of attachments where some file types just didn't have
    review UIs, and some had disabled review UIs (a PDF with a user who did
    not have access to power pack). Saw that I no longer got links to 404s.

    Summary ID
    Fix next/prev file attachments when Review UIs are unavailable.
    The next and previous file attachment pop-outs were broken if an attachment either did not have a Review UI, or had a Review UI which was not available. This change makes it so we check to ensure that the link will lead to a working page, and skip over any attachments that won't. Testing Done: Created a series of attachments where some file types just didn't have review UIs, and some had disabled review UIs (a PDF with a user who did not have access to power pack). Saw that I no longer got links to 404s.
    37b4a5ebc0c7d86496c1a25b962c63b24afcdf83
    Description From Last Updated

    Can we make these keyword-only arguments?

    chipx86chipx86

    Missing a Returns and Version Added.

    chipx86chipx86

    Let's do one per line.

    chipx86chipx86
    chipx86
    1. 
        
    2. reviewboard/reviews/ui/base.py (Diff revision 1)
       
       
       
       
       
       
       
       
      Show all issues

      Can we make these keyword-only arguments?

    3. reviewboard/reviews/ui/base.py (Diff revision 1)
       
       
       
       
       
      Show all issues

      Missing a Returns and Version Added.

    4. reviewboard/reviews/views/attachments.py (Diff revision 1)
       
       
       
      Show all issues

      Let's do one per line.

    5. 
        
    david
    maubin
    1. Ship It!
    2. 
        
    chipx86
    1. Ship It!
    2. 
        
    david
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-7.x (63ffb7f)