• 
      

    Fix a bug with the Review Summary column.

    Review Request #15015 — Created April 16, 2026 and submitted

    Information

    Review Board
    release-8.x

    Reviewers

    In our recent datagrid updates, we gave the ReviewSummaryColumn a
    link_css_class of review-request-link. This is the class used for
    review request info boxes, which takes the cell's href target and uses
    that to create the review request info box. The href target for review
    summary cells is the review URL, but the review request info box
    requires a review request URL to work properly. This was causing a bug
    where the info box was populated with a poorly formatted review request
    page.

    Previously we didn't set the link_css_class for the
    ReviewSummaryColumn, which meant that the review request info box
    wouldn't show up when hovering over the review request summary of the
    column. This change fixes the bug and improves the behaviour, we now
    supply the review request URL to the info box through the column's
    render context and a custom template for the review summary cells.

    • Ran unit tests.
    • Hovered over review summary column cells, saw the bug was fixed.
    • Hovered over review request summary column cells.
    Summary ID
    Fix a bug with the Review Summary column.
    In our recent datagrid updates, we gave the `ReviewSummaryColumn` a `link_css_class` of `review-request-link`. This is the class used for review request info boxes, which takes the cell's `href` target and uses that to create the review request info box. The `href` target for review summary cells is the review URL, but the review request info box requires a review request URL to work properly. This was causing a bug where the info box was populated with a poorly formatted review request page. Previously we didn't set the `link_css_class` for the `ReviewSummaryColumn`, which meant that the review request info box wouldn't show up when hovering over the review request summary of the column. This change fixes the bug and improves the behaviour, we now supply the review request URL to the info box through the column's render context and a custom template for the review summary cells.
    e27db99cdd21f4b40d3b2722ad7f9f8c19adf160
    Description From Last Updated

    Should be SafeString not str

    david david

    We're not expecting any exceptions from get_absolute_url, so this could be a bit simpler: render_context['review_request_url'] = \ obj.review_request.get_absolute_url() try: return …

    david david

    This needs "Args" and "Returns"

    david david

    Can we move this comment above the reviewRequestURL definition?

    david david

    This will need to be the full module path.

    chipx86 chipx86

    Can you surround the data attribute name with double backticks?

    chipx86 chipx86

    Since we're just computing the prefix, maybe we should do: const url = $target.data('review-request-url') || $target.attr('href'); return `${url}infobox/`;

    chipx86 chipx86
    david
    1. 
        
    2. reviewboard/datagrids/columns.py (Diff revision 1)
       
       
      Show all issues

      Should be SafeString not str

    3. reviewboard/datagrids/columns.py (Diff revision 1)
       
       
       
       
       
       
       
       
       
       
      Show all issues

      We're not expecting any exceptions from get_absolute_url, so this could be a bit simpler:

      render_context['review_request_url'] = \
          obj.review_request.get_absolute_url()
      
      try:
          return super().render_cell(state, obj, render_context)
      finally:
          del render_context['review_request_url']
      
    4. reviewboard/static/rb/js/ui/views/reviewRequestInfoboxView.es6.js (Diff revision 1)
       
       
       
       
       
       
       
       
       
      Show all issues

      This needs "Args" and "Returns"

    5. Show all issues

      Can we move this comment above the reviewRequestURL definition?

    6. 
        
    maubin
    chipx86
    1. 
        
    2. reviewboard/datagrids/columns.py (Diff revision 2)
       
       
      Show all issues

      This will need to be the full module path.

    3. reviewboard/datagrids/columns.py (Diff revision 2)
       
       
       
       
       
       
       
       
       
       

      I think this will be okay, but just to note, render_cell() does some caching based on a pre-set list of fields used for a key. This includes url but wouldn't include review_request_url. I assume though that this is fine because url should be more unique than review_request_url. Just want to verify my assumption on that.

      1. Yes that's right, review_request_url shouldn't be included in the cache key it would just make the key longer with no benefit. The url used in the key is the review URL which is the review request url + the review ID.

    4. Show all issues

      Can you surround the data attribute name with double backticks?

    5. Show all issues

      Since we're just computing the prefix, maybe we should do:

      const url = $target.data('review-request-url') ||
                  $target.attr('href');
      
      return `${url}infobox/`;
      
    6. 
        
    maubin
    chipx86
    1. Ship It!
    2. 
        
    david
    1. Ship It!
    2. 
        
    maubin
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-8.x (a55a977)