VSB/Incorrect data when browsing by author#1244
VSB/Incorrect data when browsing by author#1244Paurikova2 wants to merge 12 commits intocustomer/vsb-tuofrom
Conversation
|
Originally, SimpleORCIDAuthority.java was used. However, due to issues with ORCID API requests, the getLabel method in CachingOrcidRestConnector consistently returned null. Once the ORCID integration is resolved, this workaround will no longer be necessary. |
There was a problem hiding this comment.
Pull request overview
Adds a new ChoiceAuthority implementation backed by the metadata_value table to ensure “Browse by Author” displays author labels (not authority IDs), and introduces a DAO/service query to fetch metadata values by authority + language.
Changes:
- Added
MetadataValueBasedChoiceAuthorityto resolve labels and matches fromMetadataValuerecords. - Added
findByAuthorityAndLanguage()toMetadataValueDAO/MetadataValueService(+ implementation). - Added unit tests and updated test
local.cfgto wire the authority plugin.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| dspace-api/src/main/java/org/dspace/content/authority/MetadataValueBasedChoiceAuthority.java | New ChoiceAuthority implementation for label/match lookup from metadata_value. |
| dspace-api/src/main/java/org/dspace/content/service/MetadataValueService.java | Adds service API to query by authority + language. |
| dspace-api/src/main/java/org/dspace/content/MetadataValueServiceImpl.java | Implements new service method by delegating to DAO. |
| dspace-api/src/main/java/org/dspace/content/dao/MetadataValueDAO.java | Adds DAO method signature for authority + language lookup. |
| dspace-api/src/main/java/org/dspace/content/dao/impl/MetadataValueDAOImpl.java | Implements JPQL query for authority + language lookup. |
| dspace-api/src/test/java/org/dspace/content/authority/MetadataValueBasedChoiceAuthorityTest.java | Adds unit tests for new authority behavior. |
| dspace-api/src/test/data/dspaceFolder/config/local.cfg | Wires the new authority plugin for tests. |
dspace-api/src/main/java/org/dspace/content/authority/MetadataValueBasedChoiceAuthority.java
Outdated
Show resolved
Hide resolved
dspace-api/src/main/java/org/dspace/content/authority/MetadataValueBasedChoiceAuthority.java
Outdated
Show resolved
Hide resolved
dspace-api/src/main/java/org/dspace/content/authority/MetadataValueBasedChoiceAuthority.java
Outdated
Show resolved
Hide resolved
dspace-api/src/main/java/org/dspace/content/authority/MetadataValueBasedChoiceAuthority.java
Outdated
Show resolved
Hide resolved
dspace-api/src/main/java/org/dspace/content/authority/MetadataValueBasedChoiceAuthority.java
Outdated
Show resolved
Hide resolved
dspace-api/src/main/java/org/dspace/content/authority/MetadataValueBasedChoiceAuthority.java
Outdated
Show resolved
Hide resolved
dspace-api/src/main/java/org/dspace/content/dao/impl/MetadataValueDAOImpl.java
Show resolved
Hide resolved
dspace-api/src/main/java/org/dspace/content/dao/impl/MetadataValueDAOImpl.java
Outdated
Show resolved
Hide resolved
dspace-api/src/main/java/org/dspace/content/dao/impl/MetadataValueDAOImpl.java
Show resolved
Hide resolved
...ce-api/src/test/java/org/dspace/content/authority/MetadataValueBasedChoiceAuthorityTest.java
Show resolved
Hide resolved
dspace-api/src/main/java/org/dspace/content/authority/MetadataValueBasedChoiceAuthority.java
Outdated
Show resolved
Hide resolved
dspace-api/src/main/java/org/dspace/content/authority/MetadataValueBasedChoiceAuthority.java
Outdated
Show resolved
Hide resolved
dspace-api/src/main/java/org/dspace/content/authority/MetadataValueBasedChoiceAuthority.java
Outdated
Show resolved
Hide resolved
dspace-api/src/main/java/org/dspace/content/dao/impl/MetadataValueDAOImpl.java
Outdated
Show resolved
Hide resolved
dspace-api/src/main/java/org/dspace/content/dao/impl/MetadataValueDAOImpl.java
Show resolved
Hide resolved
|
@Kasinhou please test this. |
|
|
||
| /** | ||
| * ChoiceAuthority implementation that retrieves labels from metadata values table. | ||
| * Fixed LazyInitializationException by managing context persistence for CLI operations. |
dspace-api/src/main/java/org/dspace/content/authority/MetadataValueBasedChoiceAuthority.java
Show resolved
Hide resolved
dspace/config/dspace.cfg
Outdated
| include = ${module_dir}/external-providers.cfg | ||
| # Include the pre-configured ORCID feature that uses SimpleORCIDAuthority | ||
| include=features/enable-orcid.cfg | ||
| #include=features/enable-orcid.cfg |
There was a problem hiding this comment.
@Paurikova2 When I uncommented it browsing by author is not working.. it still shows UUID.
ORCID feature, must be allowed.
Problem description
In Browse by Author, the results include not only author names but also authority ID, all sorted alphabetically.