dotCMS / dotCMS/core

Option to copy contentlet without copying relationships (MANY_TO_MANY / MANY_TO_ONE)

Open
#34,798 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Enhancement OKR : Customer Support stale Team : Maintenance
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.