Allow datagrid columns to provide a custom sort field.

Review Request #5612 — Created March 11, 2014 and submitted

Information

Djblets
master
dd43410...

Reviewers

Datagrid column sorting relied on the db_field attribute of a Column,
but if a column needed to dynamically compute which field to use, it was
pretty much out of luck without resorting to hacks.

Instead, we now use get_sort_field(), which returns the field used for
sorting. This defaults to db_field, but can be overridden by subclasses.

Tested sorting of standard fields.

Used this for the review request ID field fix in Review Board, which
suddenly was able to be sorted correctly, both on global sites and
Local Sites.

david
  1. Ship It!

  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Loading...