[Koha-bugs] [Bug 10974] OAI-PMH Resumption Tokens Do Not Handle Time

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Sun Oct 27 16:44:49 CET 2013


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10974

Katrin Fischer <katrin.fischer at bsz-bw.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #22239|0                           |1
        is obsolete|                            |

--- Comment #6 from Katrin Fischer <katrin.fischer at bsz-bw.de> ---
Created attachment 22450
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=22450&action=edit
[PASSED QA] Bug 10974 - OAI-PMH Resumption Tokens Do Not Handle Time

This patch changes the value separator in OAI-PMH resumption tokens
from colons to slashes, so that the token string isn't split incorrectly
when a time is included.

TEST PLAN:

1) Turn on the OAI-PMH server syspref in Koha
2) Send a ListRecords request using 'from' and 'until' arguments that
include times (Best to use very far apart times so that you retrieve
more than 50 records which will likely be the trigger for a resumptionToken).
Here is an example:

http://KOHAINSTANCE/cgi-bin/koha/oai.pl?verb=ListRecords&
metadataPrefix=oai_dc&from=2012-09-05T13:44:33Z&until=2014-09-05T13:44:33Z

N.B. Replace KOHAINSTANCE with the URL of your Koha instance.

3) Scroll down to the bottom of the page until you find the resumptionToken.
It will look similar to this:

<resumptionToken cursor="50">
oai_dc:50:2012-09-05T13:44:33Z:2014-09-05T13:44:33Z:
</resumptionToken>

4) Copy that resumption token and send a request with it like so:

http://KOHAINSTANCE/cgi-bin/koha/oai.pl?verb=ListRecords&
resumptionToken=oai_dc:50:2012-09-05T13:44:33Z:2014-09-05T13:44:33Z:

5) The page should (incorrectly) show no records.

6) APPLY PATCH

7) Repeat steps 2, 3, and 4

8) Note that the resumptionToken now uses slashes (e.g. /) instead of
colons.

Note also that now the second request will show records!!!

N.B. This will only happen if Koha has enough records to serve to you.
If your Koha has less than 50 records, try lowering the number provided
in the "OAI-PMH:MaxCount" system preference.

Signed-off-by: Petter Goksoyr Asen <boutrosboutrosboutros at gmail.com>

I understand; I can now confirm the behaviour described in the test plan.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83 at web.de>
Passes test plan, all tests and QA script.
Resumption Token works correctly after applying the patch.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list