Koha/Koha/OAI/Server
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
..
DeletedRecord.pm Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
Description.pm Bug 14939: Modularize OAI Server existing classes 2015-12-31 15:15:05 +00:00
GetRecord.pm Bug 29135: Fix handling of deleted items in OAI-PMH provider 2021-10-22 09:42:08 -04:00
Identify.pm Bug 15108: OAI-PMH provider improvements 2017-05-08 09:27:20 -04:00
ListBase.pm Bug 29135: Fix handling of deleted items in OAI-PMH provider 2021-10-22 09:42:08 -04:00
ListIdentifiers.pm Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
ListMetadataFormats.pm Bug 15108: OAI-PMH provider improvements 2017-05-08 09:27:20 -04:00
ListRecords.pm Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
ListSets.pm Bug 28741: Fix use of resumption token params 2021-08-06 11:27:16 -04:00
Record.pm Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
Repository.pm Bug 26195: Add a way to specify authorised values should be expanded [OAI] 2021-09-03 11:17:51 -04:00
ResumptionToken.pm Bug 28741: (follow-up) Silence warning 2021-08-06 11:27:24 -04:00