Code

Opened 7 years ago

Closed 6 years ago

#3737 closed (wontfix)

Admin Interface Add forms should use the filtering from the changelist to set default values for fields

Reported by: lakin@… Owned by: nobody
Component: contrib.admin Version: master
Severity: Keywords:
Cc: lakin@… Triage Stage: Design decision needed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

When the user clicks "Add" while viewing a changelist that has been filtered in some manner, any editable fields that are specified in the filtering should default to the filtering value. (If the users is restricting the change list in some manner, it's likely they're only dealing with objects of that type.)

This is a convenience feature but is nice to have. See the (soon to be) attached patch for an initial implementation. I'd like to get some feedback on the patch because I'm unsure of my implementation of the get_add_query_string.

Attachments (1)

auto_populate_fields_from_filters.patch (1.9 KB) - added by lakin@… 7 years ago.
Auto populate fields in the add form based on filter query string.

Download all attachments as: .zip

Change History (4)

Changed 7 years ago by lakin@…

Auto populate fields in the add form based on filter query string.

comment:1 Changed 7 years ago by ubernostrum

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

I have a feeling that this won't be picked up because there's already a refactoring of the admin interface going on (see the newforms-admin branch in SVN); once it's completed, it will be much easier to write your own customizations to get specific behavior you want.

comment:2 Changed 6 years ago by jacob

  • Triage Stage changed from Unreviewed to Design decision needed

comment:3 Changed 6 years ago by lukeplant

  • Resolution set to wontfix
  • Status changed from new to closed

One problem: it is only likely that the person will want those fields filled in. If, for instance, they have been doing something else then come back to the list and press 'Add', it may be confusing/dangerous if some fields are already filled in. Personally, I can think of some other instances when I wouldn't want this at all.

Also, there is the problem of how this might interact with other ways of setting default values, and there is ubernostrum's point that it should hopefully soon be easier to add customisations like this. I suspect it is already possible to do via some javascript (using window.history ?).

So, closing as WONTFIX.

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.