Koha-clms/t/db_dependent/OAI
Ere Maijala ae75b3c4b0 Bug 29135: Fix handling of deleted items in OAI-PMH provider
When the OAI-PMH provider was configured to include item information
in the returned records, deleting an item would cause the record to
be reported as deleted. The provider also did some useless checks when
determining the timestamp of a deleted record. These checks only had
a performance impact.

To test:
1) Create /var/lib/koha/kohadev/OAI.yaml with:

format:
  marcxml:
    metadataPrefix: marcxml
    metadataNamespace: http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim
    schema: http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd
    include_items: 1

2) Set preference OAI-PMH to Enable
3) Set preference OAI-PMH:ConfFile to /var/lib/koha/kohadev/OAI.yaml
4) Delete an item from a record
5) View the page: http://localhost:8080/cgi-bin/koha/oai.pl?verb=ListRecords&metadataPrefix=marcxml
6) Note the record is now listed as deleted
7) Run prove -v t/db_dependent/OAI/

Sponsored-by: The National Library of Finland

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2021-10-22 09:42:08 -04:00
..
AndSets.t Bug 26384: Fix executable flags 2020-09-11 09:56:56 +02:00
Server.t Bug 29135: Fix handling of deleted items in OAI-PMH provider 2021-10-22 09:42:08 -04:00
Sets.t Bug 25460: Add unit test for change to C4::OAI::Sets->UpdateOAISetsBiblio() 2020-10-15 12:56:31 +02:00
oaiconf.yaml Bug 19353: Fix tests on UNIMARC 2020-10-14 14:50:07 +02:00
oaiconf_items.yaml Bug 29135: Fix handling of deleted items in OAI-PMH provider 2021-10-22 09:42:08 -04:00