core
core copied to clipboard
Many to One Relationships Not Copied in Copy Site
Parent Issue
No response
Problem Statement
When copying a site, if a content items has a many to one relationship field and the content of that relationship field lives on the system host, or another host, that relationship is not copied over when a full site copy is performed.
This severely impacts our customers who use this copy site functionality to quickly launch hundreds and thousands of sites and expect the related content to be respected upon copy.
It is important to note this is seemingly confined to the "many to one" relationship cardinality type, and is not reproducible when using "many to many".
Steps to Reproduce
To reproduce, create two content types (C1, C2), each with a title and site/folder field, each living on system host. Have C2 contain a relationship field pointing at C1, with a "many to one" designation.
Create C2 on a site and ensure it has the site/folder field value of that site, not system host, then create C1 on either another site. This c1 content item can have either it's own site value selected, or system host (it will reproduce either way).
Relate that c1 content item to the C2 content item, then copy the site the C2 content item lives with "all" objects selected. When seeing the copied content item on the copied site, you will observe the relationship is no longer included.
Acceptance Criteria
The relationship must be maintained when the content item is copied during the copy site action.
dotCMS Version
23.01, demo, and latest release.
Proposed Objective
Technical User Experience
Proposed Priority
Priority 2 - Important
External Links... Slack Conversations, Support Tickets, Figma Designs, etc.
This is a direct request from a customer implementing core functionality for a large multitenant implemenation.
Assumptions & Initiation Needs
No response
Quality Assurance Notes & Workarounds
No response
Sub-Tasks & Estimates
No response