Code

Opened 3 years ago

Closed 3 years ago

#17290 closed New feature (invalid)

Admin's "save as" does not work on records with unique constraints

Reported by: shelldweller Owned by: nobody
Component: contrib.admin Version:
Severity: Normal Keywords: admin
Cc: s.kuzmenko@… Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I would like to propose a change of behaviour for admin's "save as" functionality. Instead of blindly creating a duplicate with a new ID, open add new object view prepoulated with values dynamically pulled from the object we are copying. IMO, this is better for several reasons:

  1. We rarely (or perhaps never) want a complete duplicate. "Save as" is just a shortcut for copy-pasting. Ability to edit object prior to saving results in better user experience.
  1. Presently "save as" does not work on models with unique constraints or custom primary keys (which are not AutoField). When presented with edit form choice the user will be able to address those constraints accordingly.

If there is a concern about altering existing behaviour, perhaps there can be two distinct options: 1) "Save as new" (current functionality), and 2) "Save as..." (new functionality, triple dot implies that user input is expected.)

Attachments (0)

Change History (2)

comment:1 Changed 3 years ago by shelldweller

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • UI/UX unset

Okay, this was rally dumb. I'm already on the editing form. Please mark it as "won't fix".

comment:2 Changed 3 years ago by aaugustin

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

Closing per the reporter's instructions.

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.