core
core copied to clipboard
Relationship is not showing the right parent
Describe the bug When creating a relationship many to one, the "child" actually is the parent and the "parent" is the child, but in the UI it's shown the other way around.
To Reproduce Steps to reproduce the behavior:
- Go to Content Types portlet
- Create a content type
- Add a Relationship Field, set the Cardinality to Many to One.
- Open the just created Field, and check the UI of the relationship.
Expected behavior The child should be marked as the parent and the parent as the child.
Screenshots
DB Definition:
Relationship Definition:
Parent Id:
Reproducible in 22.03 LTS and 22.06 (demo). Customer ticket: https://dotcms.zendesk.com/agent/tickets/107691
PR: #22726
Internal QA: Needs work The relationship is not showing correctly on the other side of the relationship
Steps to reproduce:
- Create two content types (Type1 and Type2)
- Add a ManyToOne relationship field on Type1. Type1 is shown as child and Type2 as parent which is ok.
- Go to Type2 and create the other side of the same relationship. In this case Type2 is shown as child and Type1 as parent which is not correct because is the same relationship.
I've attached a video for further details
https://user-images.githubusercontent.com/8741395/188009891-f96b2172-1aef-4ff0-80f2-10b680962458.mov
PR: https://github.com/dotCMS/core/pull/22934/files
Internal QA: Needs work
From the parent side (Parent Content Type) I was able to add the relationships and the icons displayed correctly.
However, when I tried to add all the existing relationships on the other side (Child Content Type), I only see 3 of the 4 existing relationships

Internal QA (Update): Passed
Fixed, tested on release-22.10 // Docker // FF
Test if also fixes this https://github.com/dotCMS/core/issues/22532 ... Unfortunately no.