4Science / DSpace

This repository contains the 4Science optimized DSpace & DSpace-CRIS distribution.
https://wiki.lyrasis.org/display/DSPACECRIS/
BSD 3-Clause "New" or "Revised" License
43 stars 62 forks source link

singleResultOnAggregate does not work as expected on lookup with multiple data sources #335

Open olli-gold opened 1 year ago

olli-gold commented 1 year ago

Describe the bug The Lookup for Journals (and probably other lookup places) is ignoring the setting singleResultOnAggregate in cris-authority-metadata-generator.xml - when a match is found locally and on Sherpa/Romeo, there will be two matches.

To Reproduce Here is the configuration, with that this happens: cris-authority-metadata-generator.xml:

    <bean class="org.dspace.content.authority.ItemSimpleAuthorityMetadataGenerator">
        <property name="authorityName" value="SherpaAuthority"/>
        <property name="relatedInputformMetadata" value="dc_relation_ispartof"/>
        <property name="useForDisplay" value="false"/>
        <property name="useAsData" value="false"/>
        <property name="schema" value="dc"/>
        <property name="element" value="relation"/>
        <property name="qualifier" value="ispartof"/>
        <property name="singleResultOnAggregate" value="true"/>
     </bean>

Despite this configuration, there are two matches in the lookup dialog for dc.relation.ispartof: one from our local database, the other from Sherpa/Romeo. When I choose the match from Sherpa, a new item will be generated (instead of using the locally existing item).

Expected behavior There should be only one aggregated match in the lookup result.