core icon indicating copy to clipboard operation
core copied to clipboard

Relationship is not showing the right parent

Open erickgonzalez opened this issue 2 years ago • 5 comments

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:

  1. Go to Content Types portlet
  2. Create a content type
  3. Add a Relationship Field, set the Cardinality to Many to One.
  4. 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: Screen Shot 2022-07-11 at 9 16 43 AM

Relationship Definition: Screen Shot 2022-07-11 at 9 17 10 AM

Parent Id: Screen Shot 2022-07-11 at 9 18 30 AM

Reproducible in 22.03 LTS and 22.06 (demo). Customer ticket: https://dotcms.zendesk.com/agent/tickets/107691

erickgonzalez avatar Jul 11 '22 15:07 erickgonzalez

PR: #22726

nollymar avatar Aug 18 '22 20:08 nollymar

Internal QA: Needs work The relationship is not showing correctly on the other side of the relationship

Steps to reproduce:

  1. Create two content types (Type1 and Type2)
  2. Add a ManyToOne relationship field on Type1. Type1 is shown as child and Type2 as parent which is ok.
  3. 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

nollymar avatar Sep 01 '22 20:09 nollymar

PR: https://github.com/dotCMS/core/pull/22934/files

alfredo-dotcms avatar Sep 06 '22 23:09 alfredo-dotcms

Internal QA: Needs work

From the parent side (Parent Content Type) I was able to add the relationships and the icons displayed correctly. Screen Shot 2022-09-15 at 11 49 01 AM

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

Screen Shot 2022-09-15 at 11 49 44 AM

nollymar avatar Sep 15 '22 16:09 nollymar

Internal QA (Update): Passed

nollymar avatar Sep 16 '22 16:09 nollymar

Fixed, tested on release-22.10 // Docker // FF

bryanboza avatar Sep 28 '22 17:09 bryanboza

Test if also fixes this https://github.com/dotCMS/core/issues/22532 ... Unfortunately no.

erickgonzalez avatar Nov 02 '22 20:11 erickgonzalez