Code

Opened 5 months ago

Closed 4 months ago

Last modified 4 months ago

#21510 closed Bug (fixed)

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

Reported by: moritz.pfeiffer@… Owned by: claudep
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@… 5 months ago.
Sample project to demonstrate the issue
changelist_with_search_term.png (151.1 KB) - added by moritz.pfeiffer@… 5 months 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@… 5 months 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 timo 5 months ago.

Download all attachments as: .zip

Change History (13)

Changed 5 months ago by moritz.pfeiffer@…

Sample project to demonstrate the issue

Changed 5 months ago by moritz.pfeiffer@…

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

Changed 5 months ago by moritz.pfeiffer@…

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

comment:1 Changed 5 months 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 5 months ago by bmispelon

  • Triage Stage changed from Unreviewed to Accepted

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 5 months ago by bmispelon

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

comment:4 Changed 5 months ago by claudep

  • Severity changed from Normal to Release blocker

Blocker, as a regression in 1.6.

Changed 5 months ago by timo

comment:5 Changed 5 months ago by timo

  • 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 4 months ago by claudep

  • Owner changed from nobody to claudep
  • Status changed from new to assigned

comment:8 Changed 4 months ago by Claude Paroz <claude@…>

  • Resolution set to fixed
  • Status changed from assigned to closed

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 4 months 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.

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.