Code

Opened 7 years ago

Closed 7 years ago

#3742 closed (duplicate)

Function with `admin_order_field` only sorts in one direction, with no arrows

Reported by: Jeff Wheeler <jeff@…> Owned by: nobody
Component: contrib.admin Version: 0.96
Severity: Keywords: admin admin_order_field
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

When using admin_order_field on a function, it can only be sorted in one direction (ascending), and no arrows will be displayed when sorted.

my_function.admin_order_field = 'model_field'

This will result in the column showing up correctly, and it is a link which sorts, but it does not work, as described above.

Attachments (1)

admin_order_fields_desc.diff (589 bytes) - added by matt <matt.barry@…> 7 years ago.
Bidirectional change list sorting for sortable non-fields

Download all attachments as: .zip

Change History (4)

Changed 7 years ago by matt <matt.barry@…>

Bidirectional change list sorting for sortable non-fields

comment:1 Changed 7 years ago by matt <matt.barry@…>

  • Has patch set
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

Added a patch which I think fixes the problem, which is basically that the last case is comparing field_name to the current sort field; for sortable non-fields it will be admin_order_field and not field_name.

comment:2 Changed 7 years ago by renata_zan@…

  • Version changed from SVN to 0.96

tetst

comment:3 Changed 7 years ago by ubernostrum

  • Resolution set to duplicate
  • Status changed from new to closed

Is this still an issue? #3397 seems to have been re-opened and fixed multiple times to resolve issues with admin_order_field, so I'm going to close out as a duplicate. Re-open #3397 if you're still seeing problems (though at this point I don't think we'll be doing too much to the deprecated admin app).

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.