Bug 14927 - OAI-PMH listRecords result should include item data when using a resumption token
Summary: OAI-PMH listRecords result should include item data when using a resumption t...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Web services (show other bugs)
Version: Main
Hardware: All All
: P5 - low major (vote)
Assignee: Frédéric Demians
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-30 08:13 UTC by Gaetan Boisson
Modified: 2019-06-27 09:24 UTC (History)
4 users (show)

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


Attachments
Bug 14927 Returns item info when resumptionToken is used (1.63 KB, patch)
2015-09-30 10:19 UTC, Frédéric Demians
Details | Diff | Splinter Review
Bug 14927 Returns item info when resumptionToken is used (1.69 KB, patch)
2015-09-30 13:43 UTC, Gaetan Boisson
Details | Diff | Splinter Review
Bug 14927 Returns item info when resumptionToken is used (1.76 KB, patch)
2015-10-01 13:41 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 Gaetan Boisson 2015-09-30 08:13:08 UTC
Bug 12252 allowed to include item data in OAI exports to answer the needs of a number of harvesters.
Unfortunately, with the listRecords verb, item information is not included if we are using a resumption token.

Steps to reproduce :
- activate OAI-PMH with the inclusion of items as explained on bug 12252
- set the OAI-PMH:MaxCount to a low number, 50 for instance
- go to the OAI-PMH page to get the records : [your koha catalogue]/cgi-bin/koha/oai.pl?verb=ListRecords&metadataPrefix=marcxml
- check that item data is included
- get the resumptionToken at the end of the xml
- got to the next page of records [your koha catalogue]/cgi-bin/koha/oai.pl?verb=ListRecords&resumptionToken=[your resumption token]
- check that item data is now missing

I am marking this as major because bug 12252 has been pushed to master, but is actually broken if this doesn't make it to the release as well.
Comment 1 Frédéric Demians 2015-09-30 08:56:32 UTC
Do you have a patch to fix that?
Comment 2 Frédéric Demians 2015-09-30 10:19:07 UTC Comment hidden (obsolete)
Comment 3 Gaetan Boisson 2015-09-30 13:43:12 UTC Comment hidden (obsolete)
Comment 4 Gaetan Boisson 2015-09-30 13:48:21 UTC
Thanks for the really quick patch Frédéric!
Comment 5 Jonathan Druart 2015-10-01 13:41:01 UTC
Created attachment 43009 [details] [review]
Bug 14927 Returns item info when resumptionToken is used

To test:

- activate OAI-PMH with the inclusion of items as explained on bug 12252
- set the OAI-PMH:MaxCount to a low number, 50 for instance
- go to the OAI-PMH page to get the records : [your koha
  catalogue]/cgi-bin/koha/oai.pl?verb=ListRecords&metadataPrefix=marcxml
- check that item data is included
- get the resumptionToken at the end of the xml
- got to the next page of records [your koha
  catalogue]/cgi-bin/koha/oai.pl?verb=ListRecords&resumptionToken=[your
  resumption token]
- check that item data is now missing

Apply the patch, and repeat previous steps: item data is back.

Signed-off-by: Gaetan Boisson <gaetan.boisson@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 6 Tomás Cohen Arazi 2015-10-02 15:10:22 UTC
Patch pushed to master.

Thanks Frederic!