ugent-library / biblio-backoffice

Apache License 2.0
7 stars 0 forks source link

frontoffice handler: argument `updated_since` does not always work #911

Closed nicolasfranck closed 1 year ago

nicolasfranck commented 1 year ago

In the frontoffice handler to retrieve all publications or all datasets, you can supply a parameter updated_since. This is compared to the string field date_updated in the jsonb field in postgres.

Problem is though that date_updated is a regular string field, and that is both contains timestamps formatted in zulu time or with the time zone appended (vb. +02:00). The argument updated_since is also a string field, so there are mismatches possible.

How to fix this?

Fix old formats (in zulu time) in place by casting them? This would make the sorting correct

mietcls commented 1 year ago

I'll add issues to the biblio project in "to prioritise", in the future, could you add them as well? If it is not finished yet, you can always add them to "in refinement".

Please add a label as well (bug, question, ....)

mietcls commented 1 year ago

@nicolasfranck what is the impact here on researchers and librarians, so we can help prioritise this issue?

nics commented 1 year ago

closing this, works correctly for our current limited use case