IQSS / dataverse-client-javascript

A Dataverse client for JavaScript and TypeScript
MIT License
15 stars 8 forks source link

Get Dataset Use Case hierarchy property persistentId missing #154

Open g-saracca opened 3 months ago

g-saracca commented 3 months ago

Overview of the Feature Request

The response of the Get Dataset use case does not correctly send the persistentId of the dataset within the hierarchy property. Instead, it is sending the persistentId as an id property, and persistentId is being sent as undefined. See property hierarchy in the use case response.

{
    ...restOfProperties,

    "hierarchy": {
        "name": "Dataset from GS",
        "type": "dataset",
        "id": "doi:10.5072/FK2/WMJULU",
        "persistentId": undefined,
        "version": ":draft",
        "parent": {
            "name": "GS Dataverse",
            "type": "collection",
            "id": "gdataverse",
            "parent": {
                "name": "Root",
                "type": "collection",
                "id": "root"
            }
        }
    }
}

What Inspired the Request?

What Existing Behavior Do You Want Changed?

Correctly send persistentId property in hierarchy object of a dataset.

Any Brand New Behavior Do You Want to Add to js-dataverse?

None

Any Open or Closed Issues Related to This Feature Request?

Extend BreadcrumbsGenerator for action Items

ekraffmiller commented 3 months ago

The bug was in the mapping code of the SPA, rather than in the js-dataverse use case. Here is a PR for the fix: https://github.com/IQSS/dataverse-frontend/pull/404

g-saracca commented 3 months ago

Thanks @ekraffmiller!