You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
In case you have some profile with more than one hidden item/researchoutput, you cannot select/deselect/sort any other relationships To Reproduce
Steps to reproduce the behavior:
Configure relationship between person and publication (e.g. use default configuration). Go to profile page.
Select two publications/items as selected.
Now select two publications as hidden.
From now on you should only be able to add more hidden publications, but you cannot select more items or deselect/sort existing values.
No error response should occur. in the logs some line similar to this should occur (maybe shortened):
Caused by: java.lang.IllegalArgumentException: List length = -1
at java.base/java.util.Collections.nCopies(Collections.java:5027)
at org.dspace.content.RelationshipPlacesIndexingServiceImpl.addRightItemsReferences(RelationshipPlacesIndexingServiceImpl.java:105)
at org.dspace.content.RelationshipPlacesIndexingServiceImpl.updateRelationReferences(RelationshipPlacesIndexingServiceImpl.java:76)
at org.dspace.content.RelationshipServiceImpl.updatePlaceInRelationship(RelationshipServiceImpl.java:342)
at org.dspace.content.RelationshipServiceImpl.deleteRelationshipAndCopyToItem(RelationshipServiceImpl.java:822)
There seems to be some error calculation the places being indexed between relationships.
Expected behavior
We expect the user to be able to select/sort/hide existing Relationships without limitations on the amount of relations per relationshiptype.
Related work
Workaround: occurences of Collections.nCopies in the above mentioned class RelationshipPlacesIndexingServiceImpl might only be called of there are more than 0 entries to copy
PR #377 proofes the behaviour in some test-based manner.
The text was updated successfully, but these errors were encountered:
Describe the bug
In case you have some profile with more than one hidden item/researchoutput, you cannot select/deselect/sort any other relationships
To Reproduce
Steps to reproduce the behavior:
There seems to be some error calculation the places being indexed between relationships.
Expected behavior
We expect the user to be able to select/sort/hide existing Relationships without limitations on the amount of relations per relationshiptype.
Related work
Workaround: occurences of
Collections.nCopies
in the above mentioned classRelationshipPlacesIndexingServiceImpl
might only be called of there are more than 0 entries to copyPR #377 proofes the behaviour in some test-based manner.
The text was updated successfully, but these errors were encountered: