Summary: | ILS-DI GetRecords should filter out items hidden in OPAC and use OPAC MARCXML | ||
---|---|---|---|
Product: | Koha | Reporter: | David Cook <dcook> |
Component: | Web services | Assignee: | David Cook <dcook> |
Status: | Needs documenting --- | QA Contact: | Pedro Amorim <pedro.amorim> |
Severity: | normal | ||
Priority: | P5 - low | CC: | david, fridolin.somers, lucas, pedro.amorim |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: |
This updates the ILS-DI GetRecords service to use the OPAC version of the MARCXML and filter items based on their OPAC visibility. For example, if OpacHiddenItems includes "withdrawn: [1]" (hide items with a withdrawn status of 1) and hidelostitems is set to "Don't show", then an ILS_DI request for a record will not show items with a withdrawn status = 1 (Withdrawn). Previously, there was no way to hide hidden items from the ILS-DI request.
|
Version(s) released in: |
24.11.00,24.05.06
|
Circulation function: | |||
Attachments: |
Bug 38233: respect OPAC visibility for ILS-DI GetRecords
Bug 38233: respect OPAC visibility for ILS-DI GetRecords Bug 38233: respect OPAC visibility for ILS-DI GetRecords Bug 38233: Add regression tests |
Description
David Cook
2024-10-22 23:43:03 UTC
Fortunately, this is a super easy fix! Created attachment 173187 [details] [review] Bug 38233: respect OPAC visibility for ILS-DI GetRecords This change makes the ILS-DI GetRecords service use the OPAC version of the MARCXML and filters items based on their OPAC visibility Test plan: 1. Apply the patch 2. koha-plack --restart kohadev 3. Go to http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=ILS-DI and enable syspref 4. Go to http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=OpacHiddenItems and add the following: withdrawn: [1] 5. Go to http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=hidelostitems Change syspref to "Don't show" 6. Go to http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=29 7. Add a withdrawn item and a lost item with barcodes of "test1" and "test2" respectively 8. Go to http://localhost:8080/cgi-bin/koha/ilsdi.pl?service=GetRecords&id=29 9. Note the items with barcodes test1 and test2 do not appear in the "items" tree and they don't appear in the "marcxml" tree. Created attachment 173236 [details] [review] Bug 38233: respect OPAC visibility for ILS-DI GetRecords This change makes the ILS-DI GetRecords service use the OPAC version of the MARCXML and filters items based on their OPAC visibility Test plan: 1. Apply the patch 2. koha-plack --restart kohadev 3. Go to http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=ILS-DI and enable syspref 4. Go to http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=OpacHiddenItems and add the following: withdrawn: [1] 5. Go to http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=hidelostitems Change syspref to "Don't show" 6. Go to http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=29 7. Add a withdrawn item and a lost item with barcodes of "test1" and "test2" respectively 8. Go to http://localhost:8080/cgi-bin/koha/ilsdi.pl?service=GetRecords&id=29 9. Note the items with barcodes test1 and test2 do not appear in the "items" tree and they don't appear in the "marcxml" tree. Signed-off-by: David Nind <david@davidnind.com> Not related to this bug, but just noting. If I set an item with for a record with a lost status = 1 (Lost), then when viewing the record in the staff interface, it sits on "Processing". To replicate: 1. Find any record in the staff interface with an existing item and add a new item. 2. Note that when you select the "Normal" view, the holdings section lists the existing item and the new one that you created. 3. Edit the item you created and change "1 - Lost status" to "Lost". 4. Select the "Normal" view for the record again and note that a dialog box appears saying "Processing" and the holdings table does not list any items. I've created bug 38248 for this. (In reply to David Nind from comment #4) > Not related to this bug, but just noting. > > If I set an item with for a record with a lost status = 1 (Lost), then when > viewing the record in the staff interface, it sits on "Processing". Thanks for testing, David. I meant to report that as well, so thanks for doing that. I'll take a quick look to see what other bug to link that one too. Looking here Created attachment 173609 [details] [review] Bug 38233: respect OPAC visibility for ILS-DI GetRecords This change makes the ILS-DI GetRecords service use the OPAC version of the MARCXML and filters items based on their OPAC visibility Test plan: 1. Apply the patch 2. koha-plack --restart kohadev 3. Go to http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=ILS-DI and enable syspref 4. Go to http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=OpacHiddenItems and add the following: withdrawn: [1] 5. Go to http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=hidelostitems Change syspref to "Don't show" 6. Go to http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=29 7. Add a withdrawn item and a lost item with barcodes of "test1" and "test2" respectively 8. Go to http://localhost:8080/cgi-bin/koha/ilsdi.pl?service=GetRecords&id=29 9. Note the items with barcodes test1 and test2 do not appear in the "items" tree and they don't appear in the "marcxml" tree. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Created attachment 173610 [details] [review] Bug 38233: Add regression tests prove t/db_dependent/ILSDI_Services.t Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Pushed for 24.11! Well done everyone, thank you! Backported to 24.05.x for upcoming 24.05.06 I prefer not backport to 23.11.x for stability |