Bugzilla – Attachment 179477 Details for
Bug 32702
Item statuses that block holds should be checked in CanItemBeReserved
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32702: (follow-up) add cache mechanism
Bug-32702-follow-up-add-cache-mechanism.patch (text/plain), 1.57 KB, created by
Arthur Suzuki
on 2025-03-19 14:42:02 UTC
(
hide
)
Description:
Bug 32702: (follow-up) add cache mechanism
Filename:
MIME Type:
Creator:
Arthur Suzuki
Created:
2025-03-19 14:42:02 UTC
Size:
1.57 KB
patch
obsolete
>From feb3a34fe9c317f5f480ee6cf2f7dc5454f99b72 Mon Sep 17 00:00:00 2001 >From: Arthur Suzuki <arthur.suzuki@biblibre.com> >Date: Wed, 19 Mar 2025 14:09:57 +0000 >Subject: [PATCH] Bug 32702: (follow-up) add cache mechanism > >status "missing_itemtype", "notforloan", "itemlost" and "withdrawn" added by this bug were missing the cache mechanism in there return value handling. >This patch is a followup to solve this. >--- > C4/Reserves.pm | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > >diff --git a/C4/Reserves.pm b/C4/Reserves.pm >index 87042320e02..ee280ada2e5 100644 >--- a/C4/Reserves.pm >+++ b/C4/Reserves.pm >@@ -491,13 +491,13 @@ sub CanItemBeReserved { > # or something similar - need to be > # consolidated > my $itemtype = $item->effective_itemtype; >- return { status => 'missing_itemtype' } >+ return _cache { status => 'missing_itemtype' } > unless defined $itemtype; > my $notforloan_per_itemtype = Koha::ItemTypes->find($itemtype)->notforloan; > >- return { status => 'notforloan' } if ( $item->notforloan > 0 || $notforloan_per_itemtype ); >- return { status => 'itemlost' } if $item->itemlost; >- return { status => 'withdrawn' } if $item->withdrawn; >+ return _cache { status => 'notforloan' } if ( $item->notforloan > 0 || $notforloan_per_itemtype ); >+ return _cache { status => 'itemlost' } if $item->itemlost; >+ return _cache { status => 'withdrawn' } if $item->withdrawn; > > # If an item is damaged and we don't allow holds on damaged items, we can stop right here > return _cache { status => 'damaged' } >-- >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 32702
:
145590
|
149762
|
149763
|
157133
|
157134
|
161725
|
161726
|
170156
|
170157
|
170158
|
179474
|
179475
|
179476
| 179477