Bug 30913 - Show itemtype notforloan with ILS-DI service GetRecords
Summary: Show itemtype notforloan with ILS-DI service GetRecords
Status: Failed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: Web services (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: David Cook
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-06-07 00:33 UTC by David Cook
Modified: 2023-09-29 07:28 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Discovery services like EBSCO's EDS use the GetRecords ILS-DI service, but the "notforloan" only includes item-level notforloan and not item-type notforloan. This fixes this, so that if the item type is set as not for loan, ILS-DI GetRecords responses will return <notforloan>1</notforloan>.
Version(s) released in:
Circulation function:


Attachments
Bug 30913: Show notforloan from itemtype for ILS-DI GetRecords (1.46 KB, patch)
2023-08-14 00:47 UTC, David Cook
Details | Diff | Splinter Review
Bug 30913: Show notforloan from itemtype for ILS-DI GetRecords (1.50 KB, patch)
2023-08-26 22:31 UTC, David Nind
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description David Cook 2022-06-07 00:33:14 UTC
Discovery services like EBSCO's EDS use the GetRecords ILS-DI service, but the "notforloan" there only includes item-level notforloan and not item-type notforloan.

In theory, they should use GetAvailability for availability but I can see why they'd use GetRecords since it has so much more information and that way they can do 1 API call instead of 2.
Comment 1 David Cook 2022-06-07 00:34:07 UTC Comment hidden (obsolete)
Comment 2 David Cook 2022-11-07 22:55:14 UTC Comment hidden (obsolete)
Comment 3 David Cook 2023-08-14 00:47:47 UTC
Created attachment 154401 [details] [review]
Bug 30913: Show notforloan from itemtype for ILS-DI GetRecords

This patch sets notforloan for an item if its itemtype is set
to notforloan, when creating the ILS-DI GetRecords response.

To test:
0. Apply the patch
1. koha-plack --restart kohadev
2. Go to http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=ILS-DI
3. Enable the ILS-DI API
4. Go to http://localhost:8080/cgi-bin/koha/ilsdi.pl?service=GetRecords&id=29
5. Note the "notforloan" is 0
6. Go to http://localhost:8081/cgi-bin/koha/admin/itemtypes.pl?op=add_form&itemtype=BK
7. Checkbox the "Not for loan" and save
8. Go to http://localhost:8080/cgi-bin/koha/ilsdi.pl?service=GetRecords&id=29
9. Note the "notforloan" is 1
Comment 4 David Nind 2023-08-26 22:31:46 UTC
Created attachment 154861 [details] [review]
Bug 30913: Show notforloan from itemtype for ILS-DI GetRecords

This patch sets notforloan for an item if its itemtype is set
to notforloan, when creating the ILS-DI GetRecords response.

To test:
0. Apply the patch
1. koha-plack --restart kohadev
2. Go to http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=ILS-DI
3. Enable the ILS-DI API
4. Go to http://localhost:8080/cgi-bin/koha/ilsdi.pl?service=GetRecords&id=29
5. Note the "notforloan" is 0
6. Go to http://localhost:8081/cgi-bin/koha/admin/itemtypes.pl?op=add_form&itemtype=BK
7. Checkbox the "Not for loan" and save
8. Go to http://localhost:8080/cgi-bin/koha/ilsdi.pl?service=GetRecords&id=29
9. Note the "notforloan" is 1

Signed-off-by: David Nind <david@davidnind.com>
Comment 5 Marcel de Rooy 2023-09-29 07:28:27 UTC
Please add a test in t/db_dependent/ILSDI_Services.t