Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Item don't render in edit item relationships type for relationship types which are tilted on the item to which it is not tilted #2884

Closed
MarieVerdonck opened this issue Apr 2, 2024 · 2 comments · Fixed by #2929
Assignees
Labels
bug component: configurable entities related to configurable entities
Milestone

Comments

@MarieVerdonck
Copy link
Contributor

MarieVerdonck commented Apr 2, 2024

Describe the bug
When a relationship is tilted; the other side from the tilt, eg side where we expect many relationships, eg the Author side with many Publications linked to it: In its edit Item > Relationships tab the linked items via relationships don't render.

Example config:

   <type>
        <leftType>Publication</leftType>
        <rightType>Person</rightType>
        <leftwardType>isAuthorOfPublication</leftwardType>
        <rightwardType>isPublicationOfAuthor</rightwardType>
        <leftCardinality>
            <min>0</min>
        </leftCardinality>
        <rightCardinality>
            <min>0</min>
        </rightCardinality>
        <copyToLeft>true</copyToLeft>
        <tilted>LEFT</tilted>
    </type>

To Reproduce
Steps to reproduce the behavior:

  1. Configure above relationship, initialise with script ./${dspace.dir}/bin/dspace initialize-entities -f ${dspace.dir}/config/entities/test-relationship-types.xml
  2. Have a Publication-Person relationship of this type
  3. Go to Person edit Item > Relationships tab
  4. Related Publication item doesn't render
Screenshot 2024-04-02 at 14 24 36

Expected behavior
Should render the related items, paginated.

Possible cause
This is possible because these items are never initialised/cached since relationships which are tilted away from an item are not embedded (excludeTilted=true [here](https://github.com/DSpace/DSpace/blob/main/dspace-server-webapp/src/main/java/org/dspace/app/rest/repository/ItemRelationshipLinkRepository.java#L55-L58)) => So not embedded on /server/api/core/items/<uuid>/relationships

They are however included in the search the edit item relationships type does; eg /server/api/core/relationships/search/byLabel?page=0&size=5&label=isPublicationOfAuthor&dso={item-uuid}&embed=leftItem/thumbnail&embed=rightItem/thumbnail

So the edit relationships page still shows the pagination for the expected results, just doesn't render the items.

@MarieVerdonck MarieVerdonck added bug needs triage New issue needs triage and/or scheduling labels Apr 2, 2024
@github-project-automation github-project-automation bot moved this to 🆕 Triage in DSpace Backlog Apr 2, 2024
@MarieVerdonck MarieVerdonck added the component: configurable entities related to configurable entities label Apr 2, 2024
@alexandrevryghem
Copy link
Member

Atmire would like to claim this issue

@tdonohue
Copy link
Member

tdonohue commented Apr 2, 2024

Thanks @alexandrevryghem . I'll assign to you.

@tdonohue tdonohue removed the needs triage New issue needs triage and/or scheduling label Apr 2, 2024
@tdonohue tdonohue removed this from DSpace Backlog Apr 2, 2024
@tdonohue tdonohue moved this from 📋 To Do to 🙋 Needs Reviewers Assigned in DSpace 8.0 Release Apr 2, 2024
@github-project-automation github-project-automation bot moved this to 📋 To Do in DSpace 8.0 Release Apr 2, 2024
@tdonohue tdonohue moved this from 🙋 Needs Reviewers Assigned to 🏗 In Progress in DSpace 8.0 Release Apr 2, 2024
@github-project-automation github-project-automation bot moved this from 🏗 In Progress to ✅ Done in DSpace 8.0 Release Jun 5, 2024
@tdonohue tdonohue added this to the 8.0 milestone Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug component: configurable entities related to configurable entities
Projects
No open projects
Archived in project
3 participants