Label field in update-to in staging REST API should have a value, but is null
label
field in update-to
is null in staging REST API, even when the same DOI has a label value in production. For example, for DOI 10.1016/j.bmc.2020.115417:
"update-to": [
{"updated": {"date-parts": [[2020, 4, 15]],
"date-time": "2020-04-15T00:00:00Z",
"timestamp": 1586908800000},
"DOI": "10.1016/j.bmc.2019.06.006",
"type": "erratum",
"label": "Erratum"}
]
"update-to": [
{"updated": {"date-parts": [[2020, 4, 15]],
"date-time": "2020-04-15T00:00:00Z",
"timestamp": 1586908800000},
"DOI": "10.1016/j.bmc.2019.06.006",
"type": "erratum",
"label": null}
]
Definition of done
-
Available via a staging URL -
Code reviewed -
Unit tests identified, implemented, and passing -
Public documentation reviewed and updated -
Knowledge base reviewed and updated - this seems particularly important for this issue, where we've run into a lot of previously unfamiliar corners of the REST API -
Acceptance criteria met -
If the deposited type
is in the existing cayenne mapping table, map it to the appropriatelabel
field and and override any deposited label. -
If the deposited type
does not exist in the controlled vocabulary and table, but there is a depositedlabel
, use the deposited label. -
If the deposited type
is not in our mapping table and nolabel
is provided, return the depositedtype
in thelabel
field as well.
-
Edited by Dominika Tkaczyk