Opened 4 years ago

Last modified 4 years ago

#31597 closed Bug

New "Clear all filters" shown always in raw_id_fields popup — at Version 1

Reported by: frnhr Owned by: nobody
Component: contrib.admin Version: 3.1
Severity: Release blocker Keywords:
Cc: frnhr 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 (last modified by frnhr)

The new "Clear all filters" link does not play nice with raw_id_fields lookup popup window. The new link is shown in the popup regardless of any filters being selected or not.

Present in 3.1a1.

To reproduce:

  • create two models, ModelA and ModelB
    • create a Foreign key field on ModelA pointing to ModelB
    • create a boolean field on ModelB
  • create an admin page for ModelA
    • add the FK field to raw_id_fields list
  • create an admin page for ModelB
    • add the boolean field to list_filter list
  • open the admin page in a browser
  • click on the "magnifying class" icon for the ModelB field
  • expected:
    • no X Clear all filters link
  • actual:
    • yes X Clear all filters link

Additionally, clicking the link removes _to_field query param, which it should not do (_popup param is correctly preserved).


Change History (2)

by frnhr, 4 years ago

comment:1 by frnhr, 4 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.
Back to Top