Option to copy contentlet without copying relationships (MANY_TO_MANY / MANY_TO_ONE)
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 970
- Forks
- 486
- Avg merge
- 3d 33m
- Merged PRs (30d)
- 170
Description
Summary
When copying a contentlet that has MANY_TO_MANY or MANY_TO_ONE relationships, dotCMS currently copies those relationships to the new contentlet by design. This enhancement request is to make that behavior configurable: allow users to optionally copy a contentlet without copying its relationships.
Current behavior
- ONE_TO_ONE / ONE_TO_MANY: relationships are not copied when copying a contentlet.
- MANY_TO_MANY / MANY_TO_ONE: relationships are copied to the new contentlet (same related contentlets are re-applied).
For MANY_TO_MANY and MANY_TO_ONE, there is no way today to create a copy that has no relationships.
Requested enhancement
- Add an option (e.g. checkbox or dialog choice) when copying a contentlet to copy without relationships.
- When that option is selected, the new contentlet should be created with no relationships, regardless of cardinality (including MANY_TO_MANY and MANY_TO_ONE).
This would support workflows where a user wants to duplicate a child contentlet (e.g. a banner) for reuse elsewhere without automatically re-linking it to the same parent(s) (e.g. carousel).
Reference
Support ticket: https://dotcms.freshdesk.com/a/tickets/35534
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the contentlet copy flow and the relationship handling for MANY_TO_MANY and MANY_TO_ONE associations; the payload does not identify specific files or tests. Define where the copy-without-relationships choice is exposed and verify that selecting it creates a new contentlet with no relationships for every cardinality.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend, content, frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100