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.
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.
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.
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.
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>
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