Opened 19 years ago

Closed 9 years ago

#29 closed Bug (wontfix)

Fix usability issue with limit_choices_to and "Add another" in admin

Reported by: Adrian Holovaty Owned by: nobody
Component: contrib.admin Version: dev
Severity: Normal Keywords:
Cc: jamespic@… Triage Stage: Someday/Maybe
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: yes

Description

django34: We have the ability to put a customized limit/filter on which related objects get displayed in select boxes. For instance, the "photographer" field on the "Add photo" form only displays the "Staff members" that have shoots_photos=True.

django34: This results in some usability problems, though, because if a producer doesn't see a person's name in the list, he might click "Add another..." instead of checking to make sure the person isn't in "Staff members" and doesn't have "shoots_photos" checked.

django34: Does this make sense?

wilson: kind of

wilson: what page would that case appear on

django34: Here's an example...

django34: The "Photographer" select box includes *only* the staff members that have shoots_photos=True.

django34: So if a producer doesn't see a photographer in there, he might click "Add another...", which would create an entirely new staff member. But it might be the case that the staff member DOES exist, just doesn't have shoots_photos=True checked.

wilson: if the staff member did exist, would it let them add them again?

django34: Yes, as long as the slug was different.

django34: The only way I can think of to fix this would be to have some sort of "Showing only photographers [Show all staff members]" link. Or to eliminate the filtering altogether.

wilson: i was going to suggest a "show all staff" link

wilson: yes, that is my suggestion

wilson: "show all staff" link next to the select

wilson: then "show photographers only" when the filter is off

django34: All right.

Change History (17)

comment:1 by Adrian Holovaty, 19 years ago

Owner: changed from Adrian Holovaty to Wilson Miner

comment:2 by Wilson, 19 years ago

Let enough time go by and you will always disagree with yourself. I don't think my original suggestion is going to work here. "Show all staff" defeats the purpose of the limit in the first place.

The simplest solution is to just display a natural language description of the limit_choices requirements. But "Showing 53 staff members with takes photos set to true." isn't very user-friendly. Maybe this is just something that should be added to the help text for the field as a best practice?

Another problem is the fact that you can use "add another", create a new staff member that doesn't meet the limits and it won't show up. You could prefill the fields required to meet the limit in the add another popup (in this example, "takes photos" would be checked). That's not very transparent to the user, and it isn't clear that changing the prefilled fields will make your new object unavailable to the original relationship field.

comment:3 by Gary Wilson <gary.wilson@…>, 18 years ago

Triage Stage: UnreviewedDesign decision needed

This is an interesting problem.

comment:4 by Malcolm Tredinnick, 17 years ago

Triage Stage: Ready for checkinDesign decision needed

Seems to have been a victim of the recent spam attack or something. Not "ready for checkin".

comment:5 by Jacob, 17 years ago

Triage Stage: Design decision neededSomeday/Maybe
Version: SVN

comment:6 by mrts, 16 years ago

milestone: post-1.0

Non-essential for 1.0.

comment:7 by anonymous, 16 years ago

Cc: jamespic@… added

comment:8 by (none), 16 years ago

milestone: post-1.0

Milestone post-1.0 deleted

comment:10 by Alex Gaynor, 15 years ago

Reverted spam.

comment:11 by Yeago, 14 years ago

If your requirements are so particular you can show all staff members in that drop-down and have form validation warn you when attempting to select one who isn't takes_photos=True. You could create a dropdown widget which the valid choices more obvious (some bold, some gray, etc).

...or maybe sit on the idea another 5 years =)

comment:12 by Łukasz Rekucki, 14 years ago

Severity: minorNormal
Type: defectBug

comment:13 by Julien Phalip, 13 years ago

UI/UX: set

comment:14 by Aymeric Augustin, 13 years ago

UI/UX: unset

Change UI/UX from NULL to False.

comment:15 by Aymeric Augustin, 13 years ago

Easy pickings: unset

Change Easy pickings from NULL to False.

comment:16 by Aymeric Augustin, 13 years ago

UI/UX: set

Revert accidental batch modification.

comment:17 by Collin Anderson, 10 years ago

#23595 is prepopulating add fields based on limit_choices_to.

comment:18 by Karen Tracey, 9 years ago

Resolution: wontfix
Status: newclosed

I agree with wilson of 10 years ago, the most likely helpful thing to do here, when this is a problem, is to include in the help text for the field some guidance to the user as to how this field is limited. As noted above #23595 also now exists to deal with "add another" properly respecting the limit_choices_to.

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