Bug 14721 - OAI-PMH must return error when no results
Summary: OAI-PMH must return error when no results
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Web services (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor
Assignee: Fridolin Somers
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-25 09:28 UTC by Fridolin Somers
Modified: 2016-06-21 21:38 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 14721 - OAI-PMH must return error when no results (1.66 KB, patch)
2015-08-25 09:50 UTC, Fridolin Somers
Details | Diff | Splinter Review
Bug 14721 - OAI-PMH must return error when no results (1.72 KB, patch)
2015-09-04 11:32 UTC, Mirko Tietgen
Details | Diff | Splinter Review
Bug 14721 - OAI-PMH must return error when no results (1.79 KB, patch)
2015-09-04 13:58 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Fridolin Somers 2015-08-25 09:28:47 UTC
When getting records from OAI-PMH, an error must be returned if there is no results.

See : http://www.openarchives.org/OAI/openarchivesprotocol.html#ErrorConditions
Comment 1 Fridolin Somers 2015-08-25 09:50:12 UTC Comment hidden (obsolete)
Comment 2 Mirko Tietgen 2015-09-04 11:32:22 UTC Comment hidden (obsolete)
Comment 3 Jonathan Druart 2015-09-04 13:58:08 UTC
Created attachment 42404 [details] [review]
Bug 14721 - OAI-PMH must return error when no results

When getting records from OAI-PMH, an error must be returned if there is no results.

See : http://www.openarchives.org/OAI/openarchivesprotocol.html#ErrorConditions

Test plan :
- Enable OAI webservice
- Perform a query that will return no results. ie : /cgi-bin/koha/oai.pl?verb=ListRecords&metadataPrefix=marcxml&from=2099-12-30&until=2099-12-31
=> Without patch you get a response with :
   <ListRecords/>
=> With patch you get a response with error code :
   <error code="noRecordsMatch">No records match the given criteria</error>
- Check a good query returns still results
- Same test with ListIdentifiers verb

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 4 Tomás Cohen Arazi (tcohen) 2015-09-07 14:31:49 UTC
Patch pushed to master.

Goood job Frido!
Comment 5 Chris Cormack 2015-09-22 02:00:16 UTC
Pushed to 3.20.x will be in 3.20.4
Comment 6 Liz Rea 2015-09-22 04:43:49 UTC
Pushed to 3.18.x will be in 3.18.11