Skip to content

Commit e29ed83

Browse files
KasinhouMatus Kasak
andauthored
ZCU-DATA/Redirect to search with name not authority (#1297)
Co-authored-by: Matus Kasak <matus.kasak@dataquest.sk>
1 parent 91520e6 commit e29ed83

1 file changed

Lines changed: 3 additions & 8 deletions

File tree

src/app/shared/clarin-shared-util.ts

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,6 @@ export function loadItemAuthors(item, itemAuthors, baseUrl, fields, orcidDomainU
8484
authorsMV.forEach((authorMV: MetadataValue) => {
8585
let isOrcid = false;
8686
let orcidUrl: string;
87-
let searchValue: string;
88-
let searchOperator: string;
8987
if (authorMV.authority) {
9088
const authority = String(authorMV.authority).trim();
9189
if (ORCID_URL_PATTERN.test(authority)) {
@@ -95,13 +93,10 @@ export function loadItemAuthors(item, itemAuthors, baseUrl, fields, orcidDomainU
9593
orcidUrl = `${domain}/${authority}`;
9694
isOrcid = true;
9795
}
98-
searchValue = encodeURIComponent(authorMV.authority);
99-
searchOperator = 'authority';
100-
} else {
101-
searchValue = encodeURIComponent(authorMV.value);
102-
searchOperator = 'equals';
10396
}
104-
const authorSearchLink = baseUrl + '/search?f.author=' + searchValue + ',' + searchOperator;
97+
// Always redirect search by author name (equals), regardless of authority/ORCID.
98+
// The ORCID iD is only used to build the orcidUrl for the ORCID icon link.
99+
const authorSearchLink = baseUrl + '/search?f.author=' + encodeURIComponent(authorMV.value) + ',equals';
105100
const authorNameLink = Object.assign(new AuthorNameLink(), {
106101
name: authorMV.value,
107102
url: authorSearchLink,

0 commit comments

Comments
 (0)