Stream: troubleshooting

Topic: adapt publication date


view this post on Zulip Oliver Bertuch (Feb 29 2024 at 13:28):

Is it correct that in order to change the publication date of a dataset I need to mangle things in the DB? I didn't find an API call to do this... Or can I edit this metadata field using the usual Native API edit of metadata?

view this post on Zulip Philip Durbin πŸš€ (Feb 29 2024 at 13:32):

There's this: https://guides.dataverse.org/en/6.1/api/native-api.html#set-citation-date-field-type-for-a-dataset

view this post on Zulip Oliver Bertuch (Feb 29 2024 at 13:32):

I saw that one

view this post on Zulip Oliver Bertuch (Feb 29 2024 at 13:33):

But that does only change the field which is used to display the citation

view this post on Zulip Oliver Bertuch (Feb 29 2024 at 13:33):

For our reporting, it looks like we want the publicationDate thing from the metadata

view this post on Zulip Oliver Bertuch (Feb 29 2024 at 13:33):

I'm talking about this dataset: https://data.fz-juelich.de/dataset.xhtml?persistentId=doi%253A10.26165%252FJUELICH-DATA%252F1E1DTF

view this post on Zulip Oliver Bertuch (Feb 29 2024 at 13:33):

(There's another one, too)

view this post on Zulip Oliver Bertuch (Feb 29 2024 at 13:34):

It is a mere registration of a dataset published at Zenodo in 2023

view this post on Zulip Philip Durbin πŸš€ (Feb 29 2024 at 13:34):

Buh. I'm getting a 404.

view this post on Zulip Oliver Bertuch (Feb 29 2024 at 13:34):

So now I need to make the dates aligned

view this post on Zulip Oliver Bertuch (Feb 29 2024 at 13:34):

https://data.fz-juelich.de/dataset.xhtml?persistentId=doi:10.26165/JUELICH-DATA/1E1DTF

view this post on Zulip Oliver Bertuch (Feb 29 2024 at 13:35):

Sry, browser escaped the special chars

view this post on Zulip Philip Durbin πŸš€ (Feb 29 2024 at 13:35):

If memory serves, publication data is an SQL timestamp.

view this post on Zulip Philip Durbin πŸš€ (Feb 29 2024 at 13:36):

Yeah, "releasetime" at https://guides.dataverse.org/en/5.6/schemaspy/tables/datasetversion.html

view this post on Zulip Philip Durbin πŸš€ (Feb 29 2024 at 13:36):

That should be it.

view this post on Zulip Philip Durbin πŸš€ (Feb 29 2024 at 13:37):

You can update it via SQL, yes. Dirty.

view this post on Zulip Oliver Bertuch (Feb 29 2024 at 13:37):

https://github.com/poikilotherm/dataverse/blob/407d06155410b04b8d9085eb3568d192374e2742/src/main/java/edu/harvard/iq/dataverse/DvObject.java#L118-L118

view this post on Zulip Oliver Bertuch (Feb 29 2024 at 13:37):

It is a Timestamp

view this post on Zulip Oliver Bertuch (Feb 29 2024 at 13:39):

Haha yeah I can't edit it via the edit metadata thing - the JsonParser does not parse a publicationDate :see_no_evil: So hacky DB hack it is...

view this post on Zulip Oliver Bertuch (Feb 29 2024 at 14:03):

OK after a reindex of both datasets the cached exports are updates, too. Hacky, but worked.

view this post on Zulip Philip Durbin πŸš€ (Feb 29 2024 at 14:09):

Great!

view this post on Zulip Juan (Feb 29 2024 at 15:48):

@Oliver Bertuch I am sure that you know the Dataverse database much better than me, but in case it is useful, we did the next steps to modify the dataset dates:
select * from datasetfieldvalue where value like '%UTANDE-HECTAD%';
id | displayorder | value | datasetfield_id
--------+--------------+---------------------------------------------------------------------------+-----------------
144875 | 0 | CENTRAL SPAIN VEGETATION: UTANDE-HECTAD's RELEVÉS (30TWL02 UTM GRID CELL) | 216521
(1 row)

dvndb=> select * from datasetfield where id=216521;
id | datasetfieldtype_id | datasetversion_id | parentdatasetfieldcompoundvalue_id | template_id
--------+---------------------+-------------------+------------------------------------+-------------
216521 | 1 | 3508 | …

dvndb=> select dataset_id from datasetversion where id=3508;
dataset_id


  **13908**

Update dates of the current dataset version, dataset and dvobject:
dvndb=> update dvobject set createdate='2023-12-26 12:07:41.324' where id=13908;
UPDATE 1
dvndb=> update dvobject set modificationtime='2023-12-30 13:12:03.766' where id=13908;
UPDATE 1
dvndb=> update dvobject set permissionmodificationtime='2023-12-26 12:07:41.324' where id=13908;
UPDATE 1
dvndb=> update dvobject set globalidcreatetime='2023-12-26 12:07:41.324' where id=13908;
UPDATE 1
dvndb=> update datasetversion set createtime='2023-12-26 12:07:41.332' where id=3508;
UPDATE 1
dvndb=> update datasetversion set lastupdatetime='2023-12-30 13:12:03.766' where id=3508;
UPDATE 1


Last updated: Oct 30 2025 at 06:21 UTC