Skip to content

VSB/Incorrect data when browsing by author#1244

Open
Paurikova2 wants to merge 12 commits intocustomer/vsb-tuofrom
vsb/incorrect-data-in-browsing-by-author
Open

VSB/Incorrect data when browsing by author#1244
Paurikova2 wants to merge 12 commits intocustomer/vsb-tuofrom
vsb/incorrect-data-in-browsing-by-author

Conversation

@Paurikova2
Copy link
Collaborator

Problem description

In Browse by Author, the results include not only author names but also authority ID, all sorted alphabetically.

@Paurikova2
Copy link
Collaborator Author

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.

@Paurikova2 Paurikova2 requested a review from Copilot February 10, 2026 07:24
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 MetadataValueBasedChoiceAuthority to resolve labels and matches from MetadataValue records.
  • Added findByAuthorityAndLanguage() to MetadataValueDAO/MetadataValueService (+ implementation).
  • Added unit tests and updated test local.cfg to 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.

@Paurikova2 Paurikova2 requested a review from Copilot February 10, 2026 10:08
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.

@Paurikova2
Copy link
Collaborator Author

@Kasinhou please test this.


/**
* ChoiceAuthority implementation that retrieves labels from metadata values table.
* Fixed LazyInitializationException by managing context persistence for CLI operations.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing @author

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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what...

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Paurikova2 When I uncommented it browsing by author is not working.. it still shows UUID.
ORCID feature, must be allowed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments