research-software-directory / RSD-as-a-service

This repo contains the new RSD-as-a-service implementation
https://research.software
23 stars 14 forks source link

Undefined authors are imported on some mentions #1208

Closed ewan-escience closed 4 months ago

ewan-escience commented 4 months ago

When importing (when it is not in the database yet) the mention with DOI 10.1103/physrevd.108.072003, the last author is displayed as undefined undefined. This is because in the Crossref API (link), in the author array, the fields given and family are missing. Here are the last two entries of author:

{
  "ORCID": "http://orcid.org/0000-0002-9397-2313",
  "authenticated-orcid": true,
  "given": "L.",
  "family": "Zwalinski",
  "sequence": "additional",
  "affiliation": []
},
{
  "name": "ATLAS Collaboration",
  "sequence": "additional",
  "affiliation": []
}

This is because in frontend/utils/getCrossref.ts, the function extractAuthors doesn't check if these fields are present.