Bugzilla – Attachment 190431 Details for
Bug 19690
Smart rules: Term "If any unavailable" is confusing
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19690: Change comments in IsAvailableForItemLevelRequest
Bug-19690-Change-comments-in-IsAvailableForItemLev.patch (text/plain), 1.87 KB, created by
Marcel de Rooy
on 2025-12-11 08:30:57 UTC
(
hide
)
Description:
Bug 19690: Change comments in IsAvailableForItemLevelRequest
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2025-12-11 08:30:57 UTC
Size:
1.87 KB
patch
obsolete
>From b7bb0d8bd72d82e58f5437db016d3b3d7b7d37bb Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Thu, 11 Dec 2025 09:20:27 +0100 >Subject: [PATCH] Bug 19690: Change comments in IsAvailableForItemLevelRequest >Content-Type: text/plain; charset=utf-8 > >The term 'If any unavailable' is not very clear but it is also >very hard to find something short and better. > >A next available hold is possible when at least one item is >unavailable (checked out, on order, waiting/transit hold). >A item level hold is possible when the specific item is >unavailable. > >Test plan: >Read the patch. The code did not change. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > C4/Reserves.pm | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > >diff --git a/C4/Reserves.pm b/C4/Reserves.pm >index 624cf08444..39f6663647 100644 >--- a/C4/Reserves.pm >+++ b/C4/Reserves.pm >@@ -1548,9 +1548,9 @@ sub IsAvailableForItemLevelRequest { > > my $on_shelf_holds = Koha::CirculationRules->get_onshelfholds_policy( { item => $item, patron => $patron } ); > >- if ( $on_shelf_holds == 1 ) { >+ if ( $on_shelf_holds == 1 ) { # Allow > return 1; >- } elsif ( $on_shelf_holds == 2 ) { >+ } elsif ( $on_shelf_holds == 2 ) { # If all unavailable > > # These calculations work at the biblio level, and can be expensive > # we use the in-memory cache to avoid calling once per item when looping items on a biblio >@@ -1566,7 +1566,7 @@ sub IsAvailableForItemLevelRequest { > $memory_cache->set_in_cache( $cache_key, $any_available ); > return $any_available ? 0 : 1; > >- } else { # on_shelf_holds == 0 "If any unavailable" (the description is rather cryptic and could still be improved) >+ } else { # on_shelf_holds == 0 [If any unavailable] > return $item->notforloan < 0 || $item->onloan || $item->holds->filter_by_found->count; > } > } >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 19690
:
69382
| 190431