Bug 19725

Summary: OAI-PMH ListRecords and ListIdentifiers should use biblio_metadata.timestamp
Product: Koha Reporter: Julian Maurice <julian.maurice>
Component: Web servicesAssignee: Julian Maurice <julian.maurice>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: major    
Priority: P5 - low CC: dominic.pichette, fridolin.somers, jonathan.druart, nick
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 19724    
Bug Blocks:    
Attachments: Bug 19725: Add failing test
Bug 19725: OAI-PMH - Use biblio_metadata.timestamp
Bug 19725: Add failing test
Bug 19725: OAI-PMH - Use biblio_metadata.timestamp
Bug 19725: Add failing test
Bug 19725: OAI-PMH - Use biblio_metadata.timestamp

Description Julian Maurice 2017-12-01 13:09:07 UTC
Since bug 17196, biblioitems.timestamp is not always updated after a
change in the MARC record.
Filtering should be based on biblio_metadata.timestamp instead.
Comment 1 Julian Maurice 2017-12-01 15:42:50 UTC
Created attachment 69437 [details] [review]
Bug 19725: Add failing test

Also fix tests for UNIMARC

Test plan:
1. prove t/db_dependent/OAI/Server.t
2. Verify that it FAILS
Comment 2 Julian Maurice 2017-12-01 15:42:53 UTC
Created attachment 69438 [details] [review]
Bug 19725: OAI-PMH - Use biblio_metadata.timestamp

Since bug 17196, biblioitems.timestamp is not always updated after a
change in the MARC record.
Filtering should be based on biblio_metadata.timestamp instead.

Test plan:
1. prove t/db_dependent/OAI/Server.t
2. Verify that it SUCCEEDS
Comment 3 Dominic Pichette 2017-12-01 20:00:03 UTC
Sorry,

prove t/db_dependent/OAI/Server.t
t/db_dependent/OAI/Server.t .. 1/29 Can't locate object method "xslt" via package "Koha::OAI::Server::ListMetadataFormats" at Koha/OAI/Server/Repository.pm line 147.
# Looks like your test exited with 2 just after 12.
t/db_dependent/OAI/Server.t .. Dubious, test returned 2 (wstat 512, 0x200)
Failed 17/29 subtests 

Test Summary Report
-------------------
t/db_dependent/OAI/Server.t (Wstat: 512 Tests: 12 Failed: 0)
  Non-zero exit status: 2
  Parse errors: Bad plan.  You planned 29 tests but ran 12.
Files=1, Tests=12, 72 wallclock secs ( 0.03 usr  0.01 sys +  1.27 cusr  0.10 csys =  1.41 CPU)
Result: FAIL
Comment 4 Julian Maurice 2017-12-02 08:10:00 UTC
This error is caused by a too recent version of HTTP::OAI. See bug 19732
Quick fix: sudo cpanm https://cpan.metacpan.org/authors/id/T/TI/TIMBRODY/HTTP-OAI-3.28.tar.gz
Comment 5 Josef Moravec 2017-12-08 07:17:21 UTC
Created attachment 69627 [details] [review]
Bug 19725: Add failing test

Also fix tests for UNIMARC

Test plan:
1. prove t/db_dependent/OAI/Server.t
2. Verify that it FAILS

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 6 Josef Moravec 2017-12-08 07:17:24 UTC
Created attachment 69628 [details] [review]
Bug 19725: OAI-PMH - Use biblio_metadata.timestamp

Since bug 17196, biblioitems.timestamp is not always updated after a
change in the MARC record.
Filtering should be based on biblio_metadata.timestamp instead.

Test plan:
1. prove t/db_dependent/OAI/Server.t
2. Verify that it SUCCEEDS

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 7 Kyle M Hall 2017-12-21 11:18:42 UTC
Created attachment 69997 [details] [review]
Bug 19725: Add failing test

Also fix tests for UNIMARC

Test plan:
1. prove t/db_dependent/OAI/Server.t
2. Verify that it FAILS

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 8 Kyle M Hall 2017-12-21 11:19:21 UTC
Created attachment 69998 [details] [review]
Bug 19725: OAI-PMH - Use biblio_metadata.timestamp

Since bug 17196, biblioitems.timestamp is not always updated after a
change in the MARC record.
Filtering should be based on biblio_metadata.timestamp instead.

Test plan:
1. prove t/db_dependent/OAI/Server.t
2. Verify that it SUCCEEDS

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 9 Jonathan Druart 2017-12-21 16:24:46 UTC
Pushed to master for 18.05, thanks to everybody involved!
Comment 10 Nick Clemens 2018-01-15 16:41:59 UTC
Awesome work all, pushed to stable for 17.11.02
Comment 11 Fridolin Somers 2018-01-19 08:47:11 UTC
Pushed to 17.05.x for v17.05.08