Created attachment 80225 [details] The XML output of the OAI-PMH request. Example: http://brutus.local:8092/cgi-bin/koha/oai.pl?verb=ListRecords&metadataPrefix=oai_dc&from=2012-11-03&until=2012-11-04 Output contains results from 2014. Attached.
Hi Rudolf, What you describe makes me think of bug 19725, are you using 18.05.x as you selected?
I think I got it, the from/until parameters are used to retrieve the biblionumber of the records we will display. But the "datestamp" value is filled with the following query (from Koha/OAI/Server/ListBase.pm): $sql = " SELECT MAX(timestamp) FROM ( SELECT timestamp FROM biblio_metadata WHERE biblionumber = ? UNION SELECT timestamp FROM deleteditems WHERE biblionumber = ? UNION SELECT timestamp FROM items WHERE biblionumber = ? ) bi "; So my guess is that the bibliographic records have not been modified inside the date range, but items have been added/modified outside of it (in 2014).
commit 9356c050b2fa2453912581f15938e4bc16b2cc32 Bug 15108: OAI-PMH provider improvements [...] - If items are included in the records, their timestamps are taken into account everywhere so that whichever is the most recent (timestamp of biblioitem or any of its items) is considered the record's timestamp.
Thanks for the fix. I understand now that the OAI-PMH repo wasn't broken, but the dates were just displayed incorrectly. Are you sure we should be using the item date and not the record date?
It's using both - for libraries exporting item information to discovery, item changes also need to be visible via OAI.
Seesm like this one was fixed by 15108? Closing