Bug 14927

Summary: OAI-PMH listRecords result should include item data when using a resumption token
Product: Koha Reporter: Gaetan Boisson <gaetan.boisson>
Component: Web servicesAssignee: Frédéric Demians <f.demians>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: major    
Priority: P5 - low CC: christophe.brocquet, f.demians, jonathan.druart, tomascohen
Version: Main   
Hardware: All   
OS: All   
See Also: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12252
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
Bug 14927 Returns item info when resumptionToken is used
Bug 14927 Returns item info when resumptionToken is used

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!