Bug 30274 - Non-reservable items should only fill item-level reserves
Summary: Non-reservable items should only fill item-level reserves
Status: Failed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: Hold requests (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Julian Maurice
QA Contact: Pedro Amorim
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-03-11 00:32 UTC by Aleisha Amohia
Modified: 2024-08-01 15:56 UTC (History)
6 users (show)

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


Attachments
Bug 30274: Prevent non-reservable item to be set as waiting at checkin (5.97 KB, patch)
2024-07-08 12:04 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 30274: Prevent non-reservable item to be set as waiting at checkin (5.97 KB, patch)
2024-07-30 18:49 UTC, Roman Dolny
Details | Diff | Splinter Review
Bug 30274: Prevent non-reservable item to be set as waiting at checkin (6.02 KB, patch)
2024-07-30 18:51 UTC, Roman Dolny
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Aleisha Amohia 2022-03-11 00:32:19 UTC
For item types where 'holds allowed(total)' equals 0, you can still place reserves on these non-reservable items via the staff client by overriding the circulation rule.

The bug is that, when you check in an item that is non-reservable (holds allowed is 0), it will trigger the holds pop-up and can fill a biblio-level hold ("next available").

The holds pop-up should only be triggered by non-reservable items if there is an item-level reserve on it.
Comment 1 Sharon Dugdale 2023-04-20 13:17:40 UTC
We have just noticed this is happening when a non-reservable item is checked in - KOHA is saying that it is available to satisfy a request.
We have two library services (Public Libraries and Schools Library Service) using the same system and catalogue, though the stock is NOT inter-changeable and the school stock is shadowed on the OPAC. On occasion school stock is returned to a public library by mistake and when these items are checked in, if a request is pending, KOHA makes it available to satisfy it.
The Schools Service does NOT use a request function on KOHA so it would be up to the Public Library staff to identify these errors and ensure these items are NOT trapped for holds.
Within the Public Libraries, we also have unreservable and OPAC shadowed stock which may also be affected.
Comment 2 Julian Maurice 2024-07-08 12:04:33 UTC
Created attachment 168588 [details] [review]
Bug 30274: Prevent non-reservable item to be set as waiting at checkin

Test plan:
1. Create a biblio with 2 items:
  * 1st item:
    * Barcode: ITEM1
    * Item type: TYPE1
    * Homebranch and holdingbranch: LIBRARY
  * 2nd item:
    * Barcode: ITEM2
    * Item type: TYPE2
    * Homebranch and holdingbranch: LIBRARY
2. Create a circulation rule for LIBRARY, TYPE1 with "Holds allowed
   (total)" = 1
3. Create a circulation rule for LIBRARY, TYPE2 with "Holds allowed
   (total)" = 0
4. Place a biblio-level hold on that biblio with a patron from library
   LIBRARY.
5. Check in: ITEM2
   Without the patch, the "Hold found" popup appears, allowing you to
   confirm hold for a non-reservable item
   With the patch, no popup appears.
Comment 3 Roman Dolny 2024-07-30 18:49:56 UTC
Created attachment 169874 [details] [review]
Bug 30274: Prevent non-reservable item to be set as waiting at checkin

Test plan:
1. Create a biblio with 2 items:
  * 1st item:
    * Barcode: ITEM1
    * Item type: TYPE1
    * Homebranch and holdingbranch: LIBRARY
  * 2nd item:
    * Barcode: ITEM2
    * Item type: TYPE2
    * Homebranch and holdingbranch: LIBRARY
2. Create a circulation rule for LIBRARY, TYPE1 with "Holds allowed
   (total)" = 1
3. Create a circulation rule for LIBRARY, TYPE2 with "Holds allowed
   (total)" = 0
4. Place a biblio-level hold on that biblio with a patron from library
   LIBRARY.
5. Check in: ITEM2
   Without the patch, the "Hold found" popup appears, allowing you to
   confirm hold for a non-reservable item
   With the patch, no popup appears.
Comment 4 Roman Dolny 2024-07-30 18:51:54 UTC
Created attachment 169875 [details] [review]
Bug 30274: Prevent non-reservable item to be set as waiting at checkin

Test plan:
1. Create a biblio with 2 items:
  * 1st item:
    * Barcode: ITEM1
    * Item type: TYPE1
    * Homebranch and holdingbranch: LIBRARY
  * 2nd item:
    * Barcode: ITEM2
    * Item type: TYPE2
    * Homebranch and holdingbranch: LIBRARY
2. Create a circulation rule for LIBRARY, TYPE1 with "Holds allowed
   (total)" = 1
3. Create a circulation rule for LIBRARY, TYPE2 with "Holds allowed
   (total)" = 0
4. Place a biblio-level hold on that biblio with a patron from library
   LIBRARY.
5. Check in: ITEM2
   Without the patch, the "Hold found" popup appears, allowing you to
   confirm hold for a non-reservable item
   With the patch, no popup appears.

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Comment 5 Pedro Amorim 2024-08-01 15:56:55 UTC
The patch is causing tests to fail:

prove t/db_dependent/Circulation.t
t/db_dependent/Circulation.t .. 70/75 
    #   Failed test 'Branchcodes match when hold exists.'
    #   at t/db_dependent/Circulation.t line 6622.
    #          got: undef
    #     expected: 'fPd0uu'
    # Looks like you failed 1 test of 4.

#   Failed test 'CanBookBeIssued + needsconfirmation message'
#   at t/db_dependent/Circulation.t line 6637.
t/db_dependent/Circulation.t .. 75/75 # Looks like you failed 1 test of 75.
t/db_dependent/Circulation.t .. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/75 subtests 

Test Summary Report
-------------------
t/db_dependent/Circulation.t (Wstat: 256 (exited 1) Tests: 75 Failed: 1)
  Failed test:  71
  Non-zero exit status: 1
Files=1, Tests=75, 40 wallclock secs ( 0.07 usr  0.02 sys + 23.51 cusr 12.90 csys = 36.50 CPU)
Result: FAIL