Skip to content

API inconsistency for release time between JsonParser/JsonPrinter #11594

@poikilotherm

Description

@poikilotherm

What steps does it take to reproduce the issue?

  1. Download JSON of dataset / dataset version.
  2. Try to create a new dataset from that.
  3. Watch it fail because

When does this issue occur?

It was especially obvious during testing. Used a JSON from an instance to create a unit test and had to debug why it wasn't accepting the data.

Which page(s) does it occurs on?
API

What happens?
See above.

To whom does it occur (all users, curators, superusers)?
Everybody when trying to create/import a dataset with an existing PID.

What did you expect to happen?
That I can import the data I dumped somewhere else.

  1. Not sure how many people may have used "releaseDate" in the parser in the past, but as the issue has been around forever, maybe next to no one. So maybe it's fine to rename the parameter and just add a note to the API docs about the change.
  2. Also, up until now the parser accepted only a YYYY-mm-dd formatted date, not a timestamp (java.util.Date). I suppose we need a backward compatible fix? Or not?

I didn't see the fields being used in pyDataverse or easyDataverse.

Which version of Dataverse are you using?
develop (but the discrepancy has been around since 2014 according to the Git log)

Any related open or closed issues to this bug report?
I didn't see any.

Side note: #6810 - such discrepancies happen when doing these things manually and with no schemas around.

Are you thinking about creating a pull request for this issue?
Yes.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Status

    Important

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions