Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#21510 closed Bug (fixed)

Admin change list search field is missing the "show all" link

Reported by: moritz.pfeiffer@… Owned by: Claude Paroz
Component: contrib.admin Version: 1.6
Severity: Release blocker Keywords: search field show all missing link
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: yes

Description

The admin change list search field is missing the link to reset the search term.
In Django 1.5 there was a link with wording like "1 result (4 total)" to the right of the search field. This link is missing in Django 1.6. The only way to see all of the items in the change list is to perform a search with an empty string search term.

Attachments (4)

search_test.zip (10.0 KB) - added by moritz.pfeiffer@… 3 years ago.
Sample project to demonstrate the issue
changelist_with_search_term.png (151.1 KB) - added by moritz.pfeiffer@… 3 years ago.
Screen shot of the change list from the sample project, demonstrating the missing "show all" link
Expected_behavior.png (51.3 KB) - added by moritz.pfeiffer@… 3 years ago.
Screen shot of Django 1.5 demonstrating the expected behavior, e.g. a link that resets the search term is present
21510.diff (645 bytes) - added by Tim Graham 3 years ago.

Download all attachments as: .zip

Change History (13)

Changed 3 years ago by moritz.pfeiffer@…

Attachment: search_test.zip added

Sample project to demonstrate the issue

Changed 3 years ago by moritz.pfeiffer@…

Screen shot of the change list from the sample project, demonstrating the missing "show all" link

Changed 3 years ago by moritz.pfeiffer@…

Attachment: Expected_behavior.png added

Screen shot of Django 1.5 demonstrating the expected behavior, e.g. a link that resets the search term is present

comment:1 Changed 3 years ago by anonymous

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset

The admin login for the sample project is
user: moritz
password: pass

comment:2 Changed 3 years ago by Baptiste Mispelon

Triage Stage: UnreviewedAccepted

Hi,

I can indeed reproduce the issue you're describing.

From what I can tell, this removal wasn't intentional since the code in django/contrib/admin/templates/admin/search_form.html was basically untouched between 1.5 and 1.6 [1]

[1] https://github.com/django/django/commits/master/django/contrib/admin/templates/admin/search_form.html

comment:3 Changed 3 years ago by Baptiste Mispelon

Looks like the problem was introduced by commit f07a5f0a21857204465019b4e68f914d31cb396a (found with git bisect).

comment:4 Changed 3 years ago by Claude Paroz

Severity: NormalRelease blocker

Blocker, as a regression in 1.6.

Changed 3 years ago by Tim Graham

Attachment: 21510.diff added

comment:5 Changed 3 years ago by Tim Graham

Has patch: set
Needs tests: set

Attached is a patch that seems to fix the issue although I haven't run the tests or checked the code in a comprehensive fashion.

comment:6 Changed 3 years ago by Claude Paroz

Owner: changed from nobody to Claude Paroz
Status: newassigned

comment:7 Changed 3 years ago by Claude Paroz

Needs tests: unset

comment:8 Changed 3 years ago by Claude Paroz <claude@…>

Resolution: fixed
Status: assignedclosed

In c7c647419cb857fe53cf1368c10223c6e042c216:

Fixed #21510 -- Readded search reset link in changelist search bar

Thanks moritz.pfeiffer at alp-phone.ch for the report and
Tim Graham for the initial patch.

comment:9 Changed 3 years ago by Claude Paroz <claude@…>

In d32637d81b6b4adf6440bead756fb5a063e4d28d:

[1.6.x] Fixed #21510 -- Readded search reset link in changelist search bar

Thanks moritz.pfeiffer at alp-phone.ch for the report and
Tim Graham for the initial patch.
Backport of c7c647419c from master.

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