Opened 2 months ago

Last modified 2 months ago

#35747 closed Bug

Admin change list doesn't redirect to default ordering when the last ordering field is removed from sorting — at Initial Version

Reported by: ldeluigi Owned by:
Component: contrib.admin Version: 5.1
Severity: Normal Keywords: admin change list ordering sorting sortremove
Cc: ldeluigi Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: yes

Description

Basically, when an admin maually clicks on the sortremove link of the last remaining field in the sorting query variable, the redirect points to an empty string.

For example, if the query parameter is the default o, the redirect points to /?o=, which results in the change list not being ordered at all. Instead, I'm claiming that users would expect to see the same ordering they experience when landing on the change list page in the first place, which was the default ordering, only visible when the ordering parameter is absent from the sortremove query.

For this reason, I'd like the sortremove to redirect to / instead of /?o= when the last ordering field would be removed.

I'm opening a PR that *should* do the job.

Change History (0)

Note: See TracTickets for help on using tickets.
Back to Top