Skip to content
This repository has been archived by the owner on Oct 20, 2023. It is now read-only.

Ignore certain fields #39

Closed
wesort opened this issue Mar 17, 2022 · 2 comments · Fixed by #42
Closed

Ignore certain fields #39

wesort opened this issue Mar 17, 2022 · 2 comments · Fixed by #42

Comments

@wesort
Copy link

wesort commented Mar 17, 2022

What would you like to see added?

Desired: The ability to not duplicate certain fields.

Usecase: We're using Uuid to generate human readable entry ID's for a field called archive_uuid. These supplement the {s} id and are used as a segment in the slug. When an entry is duplicated, I'd like a config option to not duplicate this field as Uuid will generate a new/unique value. As it's used in the URL, the entry won't save again after duplication with an error on slug field: This URI has already been taken. This is not entirely true as the slug is not actually used, but rather that the archive_uuid value is not unique. The archive_uuid field is used across three collections and I have wondered while writing this if this extra config would need to be collection/taxonomy specific.

Is there a workaround you can use in the meantime?

In the meantime, I've set the archive_uuid field to be read_only: false but ideally this would be set to read_only: true to ensure authors do not tamper with it.

With this workaround authors can: duplicate an entry > clear the archive_uuid field > save the entry > Uuid will generate a new value.

Priority wise - where's this feature for you?

Nice to have

@duncanmcclean
Copy link
Owner

That's a good idea! I don't have any time to build it out but I'd happily accept a pull request.

@duncanmcclean
Copy link
Owner

Released in v2.2.0! 🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants