Bug 15292 - Libris (Swedish national catalogue) item status service
Summary: Libris (Swedish national catalogue) item status service
Status: Failed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: Web services (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low new feature
Assignee: Martin Persson
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-03 15:04 UTC by Martin Persson
Modified: 2023-08-28 19:58 UTC (History)
2 users (show)

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


Attachments
Bug 15292 - Libris ILS-DI item status (service) (5.61 KB, patch)
2015-12-03 15:26 UTC, Martin Persson
Details | Diff | Splinter Review
Bug 15292 - Libris ILS-DI item status (tests) (4.23 KB, patch)
2015-12-03 15:27 UTC, Martin Persson
Details | Diff | Splinter Review
Bug 15292 - Libris ILS-DI item status (opac) (2.30 KB, patch)
2015-12-03 15:27 UTC, Martin Persson
Details | Diff | Splinter Review
Bug 15292 - Libris ILS-DI item status (service) (6.14 KB, patch)
2015-12-03 15:47 UTC, Martin Persson
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Persson 2015-12-03 15:04:39 UTC
In Sweden most libraries pulls their MARC records from a central repository run by the Royal Library in Stockholm. These MARC records include a unique identifier in control field 001 which is used to identify a particular bibliographic entry.

Anyone can browse this online database of available works. Once an interesting title is found the visitor can list all libraries that holds that particular book. Once a library is selected, the status of that item can be queried in realtime from the home page.

In order to facilitate that query the ILS must implement a handler for a specific HTTP request. The request has a single parameter, the Libris ID of the bibliographic entry, stored in the MARC record.

This patch adds a new ILS-DI service called GetLibrisAvailability that takes a single string as an ID and uses Zebra/Z39.50 to search for it (Koha luckily indexes this field by default). If found, the search result is used to locate the entry in the SQL database to retrieve the current status of the item. This is returned as an XML document to the central Libris server.

I need feedback on how to implement tests for Z39.50 functionality. I would like to programmatically insert a faked work much like how TestBuilder can be used to generate fake SQL data.
Comment 1 Martin Persson 2015-12-03 15:26:37 UTC Comment hidden (obsolete)
Comment 2 Martin Persson 2015-12-03 15:27:06 UTC
Created attachment 45359 [details] [review]
Bug 15292 - Libris ILS-DI item status (tests)

This patch adds the GetLibrisAvailability tests.

Sponsored-By: Halland County Library
Comment 3 Martin Persson 2015-12-03 15:27:30 UTC
Created attachment 45360 [details] [review]
Bug 15292 - Libris ILS-DI item status (opac)

This patch adds the GetLibrisAvailability method
to the ILS-DI service endpoint in the OPAC.

Sponsored-By: Halland County Library
Comment 4 Martin Persson 2015-12-03 15:47:25 UTC
Created attachment 45363 [details] [review]
Bug 15292 - Libris ILS-DI item status (service)

This patch adds the GetLibrisAvailability method
to the ILS-DI service module.

Updated version with whitespace fixes.

Sponsored-By: Halland County Library
Comment 5 Martin Persson 2015-12-03 15:50:00 UTC
Setting to 'Needs Signoff' to get feedback.
Comment 6 David Cook 2015-12-03 23:36:09 UTC
I don't know what others think, but it seems inappropriate to add GetLibrisAvailability as a ILS-DI function, since ILS-DI is an API with a pre-existing specification to which "GetLibrisAvailability" does not belong: https://old.diglib.org/architectures/ilsdi/DLF_ILS_Discovery_1.1.pdf

I'm not an expert on ILS-DI, but that's my understanding.

I would suggest adding a service in the "svc/" directory instead as that doesn't depend on any standards. 

Also, is there a reason why you use Zebra/Z39.50 instead of just checking the database directly?
Comment 7 Katrin Fischer 2015-12-06 19:45:47 UTC
I think I like the idea of this being separate from ILS-DI somewhere in the svc directory.
Comment 8 Bernardo Gonzalez Kriegel 2015-12-18 11:57:10 UTC
(In reply to Martin Persson from comment #5)
> Setting to 'Needs Signoff' to get feedback.

Hi Martin,
patches applies cleanly, no koha-qa errors

It's ok to add new services, but please take into account Katrin and David comments. This will not pass in it's current form.

Please add some kind of test plan, a tester need to know how to test and what to expect. Perhaps a passing test is enough, but we must know.

Lastly, 'prove -v t/db_dependent/ILSDI_Services.t' now fails on last test

not ok 18 - Test missing item info
Comment 9 Katrin Fischer 2023-08-28 19:58:03 UTC
Is this something the Libris libraries would still be interested in? Maybe it could be implemented as a plugin now or using the REST API?