[develop | DONE | FIXED]: searchResearchResults.service.ts & resultLanding.service.ts & deletedByInference.service.ts: #9425 - When an author (same name & rank) has 2 instances on the same record, keep orcid information if exists in at least one instance.

This commit is contained in:
Konstantina Galouni 2024-01-24 17:03:15 +02:00
parent 2b9953503a
commit 0a47193bf3
3 changed files with 27 additions and 0 deletions

View File

@ -145,6 +145,15 @@ export class DeletedByInferenceService {
if(author.orcid_pending) {
author.orcid_pending = author.orcid_pending.toUpperCase();
}
if(result['authors'][author.rank] && results['authors'][author.rank].fullName == author.content) {
if(!author.orcid && result['authors'][author.rank].orcid) {
author.orcid = result['authors'][author.rank].orcid;
} else if(!author.orcid_pending && result['authors'][author.rank].orcid_pending) {
author.orcid_pending = result['authors'][author.rank].orcid_pending;
}
}
result['authors'][author.rank] = {"fullName": author.content, "orcid": author.orcid, "orcid_pending": author.orcid_pending};
}
}

View File

@ -381,6 +381,15 @@ export class ResultLandingService {
if (author.orcid_pending) {
author.orcid_pending = author.orcid_pending.toUpperCase();
}
if(this.resultLandingInfo['authors'][author.rank] && this.resultLandingInfo['authors'][author.rank].fullName == author.content) {
if(!author.orcid && this.resultLandingInfo['authors'][author.rank].orcid) {
author.orcid = this.resultLandingInfo['authors'][author.rank].orcid;
} else if(!author.orcid_pending && this.resultLandingInfo['authors'][author.rank].orcid_pending) {
author.orcid_pending = this.resultLandingInfo['authors'][author.rank].orcid_pending;
}
}
this.resultLandingInfo['authors'][author.rank] = {
"fullName": author.content,
"orcid": author.orcid,

View File

@ -348,6 +348,15 @@ export class SearchResearchResultsService {
if (author.orcid_pending) {
author.orcid_pending = author.orcid_pending.toUpperCase();
}
if(result['authors'][author.rank] && result['authors'][author.rank].fullName == author.content) {
if(!author.orcid && result['authors'][author.rank].orcid) {
author.orcid = result['authors'][author.rank].orcid;
} else if(!author.orcid_pending && result['authors'][author.rank].orcid_pending) {
author.orcid_pending = result['authors'][author.rank].orcid_pending;
}
}
result['authors'][author.rank] = {
"fullName": author.content,
"orcid": author.orcid,