4008: ReviewBoard 2.5 does not show summaries in request lists


What version are you running?


What's the URL of the page containing the problem?


What steps will reproduce the problem?

  1. Go to review requests page
  2. Note that all the summaries say "None"

What is the expected output? What do you see instead?

Expected: Summary of each review request
Actual: "None"

What operating system are you using? What browser?

Linux, Firefox

Please provide any additional information below.

This error appears in the logs:

[Mon Nov 02 12:27:30 2015] [error] ERROR:root:Error when calling render_data for DataGrid Column <reviewboard.datagrids.columns.SummaryColumn object at 0x12d2b0d0>: zero length field name in format
[Mon Nov 02 12:27:30 2015] [error] Traceback (most recent call last):
[Mon Nov 02 12:27:30 2015] [error] File "/usr/lib/python2.6/site-packages/Djblets-0.9-py2.6.egg/djblets/datagrid/grids.py", line 447, in render_cell
[Mon Nov 02 12:27:30 2015] [error] rendered_data = self.render_data(state, obj)
[Mon Nov 02 12:27:30 2015] [error] File "/usr/lib/python2.6/site-packages/ReviewBoard-2.5-py2.6.egg/reviewboard/datagrids/columns.py", line 678, in render_data
[Mon Nov 02 12:27:30 2015] [error] display_data += format_html('<span>{}</span>', summary)
[Mon Nov 02 12:27:30 2015] [error] File "/usr/lib/python2.6/site-packages/Django-1.6.11-py2.6.egg/django/utils/html.py", line 82, in format_html
[Mon Nov 02 12:27:30 2015] [error] return mark_safe(format_string.format(args_safe, *kwargs_safe))
[Mon Nov 02 12:27:30 2015] [error] ValueError: zero length field name in format

The issue is in SummaryColumn.render_data:

    display_data = format_html_join(
        '', '<label class="{}">{}</label>', labels)

    if summary:
        display_data += format_html('<span>{}</span>', summary)
        display_data += format_html('<span class="no-summary">{}</span>',
                                    _('No Summary'))

django.utils.format.format_html is complaining that "{}" has no field name. Changing it to "{0}" fixes the error.

    display_data = format_html_join(
        '', '<label class="{0}">{0}</label>', labels)

    if summary:
        display_data += format_html('<span>{0}</span>', summary)
        display_data += format_html('<span class="no-summary">{0}</span>',
                                    _('No Summary'))
#1 brennie

This has already been fixed. Thanks!