Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapt object duplication #127

Open
wants to merge 2 commits into
base: deploy
Choose a base branch
from
Open

Adapt object duplication #127

wants to merge 2 commits into from

Conversation

koeaw
Copy link
Collaborator

@koeaw koeaw commented Jun 5, 2024

When duplicating objects:

  • don't copy the original data source
  • instead set the duplicate's status to progress_status to new/"created" (note: a separate "duplicate" status may make sense)
  • where a notes field exists, add information about the source object, i.e. its ID, to the duplicate's notes

Also for objects which have a siglum field, which is unique (i.e. Work objects), set the field None before first saving the duplicate.

@koeaw
Copy link
Collaborator Author

koeaw commented Jun 5, 2024

Re: notes field: the current solution doesn't preserve its contents (if there are any) -> append info about the duplicate to whatever's already there!

@koeaw koeaw force-pushed the kk/feat/adapt_duplication branch 2 times, most recently from 05b7a43 to 5b299e6 Compare June 10, 2024 08:44
koeaw added 2 commits July 3, 2024 14:07
Add post_duplicate signal to manipulate fields/field contents
of entity objects created as copies of existing entity
objects (via duplicate button).
Add pre_duplicate signal to deal with fields of entity
object instances which won't allow object duplication
(e.g. fields with unique constraints).
@koeaw koeaw force-pushed the kk/feat/adapt_duplication branch from 5b299e6 to 644659a Compare July 3, 2024 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant