3295: review_id in request columns user profile breaks reviewboard for some users when upgrading from 1.7.16 to 2.0rc1

michael*******@fieldaw******* (Google Code) (Is this you? Claim this profile.)
March 25, 2014
What version are you running?

1.7.16 (attempted to upgrade to 2.0rc1)

(I've now upgraded to 1.7.22, it looks like the same thing will happen when I upgrade.)

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

https://reviewboard.example.com/dashboard/

What steps will reproduce the problem?
1. Add review id as a column in the dashboard
2. Optionally sort on it
3. Upgrade to 2.0rc1

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

Expecting the dashboard, instead you get the following exception:

FieldError: Cannot resolve keyword u'review_id' into field. Choices are: blocks, branch, bugs_closed, changedescs, changenum, commit_id, depends_on, description, diffset_history, draft, draft_blocks, email_message_id, extra_data, file_attachments, id, inactive_file_attachments, inactive_screenshots, issue_dropped_count, issue_open_count, issue_resolved_count, last_review_activity_timestamp, last_updated, local_id, local_site, public, repository, reviews, rich_text, screenshots, shipit_count, starred_by, status, submitter, summary, target_groups, target_people, testing_done, time_added, time_emailed, visits

Stacktrace (most recent call first):

  File "django/db/models/sql/query.py", line 1277, in names_to_path
    "Choices are: %s" % (name, ", ".join(available)))
  File "django/db/models/sql/query.py", line 1357, in setup_joins
    names, opts, allow_many, allow_explicit_fk)
  File "django/db/models/sql/compiler.py", line 466, in _setup_joins
    pieces, opts, alias)
  File "django/db/models/sql/compiler.py", line 433, in find_ordering_name
    field, cols, alias, joins, opts = self._setup_joins(pieces, opts, alias)
  File "django/db/models/sql/compiler.py", line 399, in get_ordering
    self.query.get_meta(), default_order=asc):
  File "django/db/models/sql/compiler.py", line 83, in as_sql
    ordering, o_params, ordering_group_by = self.get_ordering()
  File "django/db/models/sql/compiler.py", line 772, in execute_sql
    sql, params = self.as_sql()
  File "django/db/models/sql/compiler.py", line 709, in results_iter
    for rows in self.execute_sql(MULTI):
  File "django/db/models/query.py", line 1065, in iterator
    for row in self.query.get_compiler(self.db).results_iter():
  File "django/db/models/query.py", line 854, in _fetch_all
    self._result_cache = list(self.iterator())
  File "django/db/models/query.py", line 96, in __iter__
    self._fetch_all()
  File "djblets/datagrid/grids.py", line 797, in precompute_objects
    'pk', flat=True))
  File "djblets/datagrid/grids.py", line 727, in load_state
    self.precompute_objects(render_context)
  File "djblets/datagrid/grids.py", line 921, in render_to_response
    self.load_state(render_context)
  File "reviewboard/datagrids/views.py", line 59, in dashboard
    return grid.render_to_response(template_name)
  File "reviewboard/accounts/decorators.py", line 44, in _check_valid_prefs
    return view_func(request, *args, **kwargs)
  File "reviewboard/site/decorators.py", line 35, in _check
    return view_func(request, local_site=local_site, *args, **kwargs)
  File "django/contrib/auth/decorators.py", line 22, in _wrapped_view
    return view_func(request, *args, **kwargs)
  File "django/core/handlers/base.py", line 114, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)


What operating system are you using? What browser?

Server: Amazon Linux AMI
Client: OS X 10.9.2 + FireFox Aurora

Please provide any additional information below.

This looks like a possibly missing migration from 1.7.x to 2.0.

If I go into the admin dashboard and remove the review_id from the user profile request columns it works fine.
david
#1 david
This is already fixed in git (release-2.0.x, 0bbcd45). This will ship in 2.0rc2. Thanks!
  • +Fixed