Bugzilla – Attachment 134666 Details for
Bug 30697
Cannot renew when record is on hold under specific conditions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30697: Fix return value when $items_any_available is defined
Bug-30697-Fix-return-value-when-itemsanyavailable-.patch (text/plain), 2.05 KB, created by
Shi Yao Wang
on 2022-05-05 21:32:03 UTC
(
hide
)
Description:
Bug 30697: Fix return value when $items_any_available is defined
Filename:
MIME Type:
Creator:
Shi Yao Wang
Created:
2022-05-05 21:32:03 UTC
Size:
2.05 KB
patch
obsolete
>From f46baf1b3a40c316ef0587ad0e4185d0b6cc51a8 Mon Sep 17 00:00:00 2001 >From: Shi Yao Wang <shi-yao.wang@inlibro.com> >Date: Thu, 5 May 2022 16:41:41 -0400 >Subject: [PATCH] Bug 30697: Fix return value when $items_any_available is > defined > >Return the value of $item_any_available when it is defined instead of >the opposite value. > >Here is a test plan to reproduce an issue created by this bug > >Test plan: >1- Go to administration > system preferences > >AllowRenewalIfOtherItemsAvailable and select "Allow" >2- Go to administration > circulation and fine rules and create an >All/All rule where "on shelf holds allowed" is set to "if all unavailable" >3- Have at least 2 library branches >Go to administration > libraries > new library >to create them >4- Have 2 users, one from each library >Go to patrons > new patron >to create them >5- Have 2 items of the same record, but one item from each library >Go to catalog > create or find a record > new > new item >to create them >6- Make the first user check out the first item >7- Make the second user place a hold on the same record (even though it >is not allowd) >8- Go back to the first user's page and try to renew >9- Notice it is written "on hold" under "Renew" even though the first user should be >able to renew his item >10- Apply the patch >11- Refresh and notice it now shows the usual checkbox to renew >--- > C4/Reserves.pm | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > >diff --git a/C4/Reserves.pm b/C4/Reserves.pm >index d6121a7616..4b7ecffe1a 100644 >--- a/C4/Reserves.pm >+++ b/C4/Reserves.pm >@@ -1352,8 +1352,7 @@ sub IsAvailableForItemLevelRequest { > > # if we have this param predefined from outer caller sub, we just need > # to return it, so we saving from having loop inside other loop: >- return $items_any_available ? 0 : 1 >- if defined $items_any_available; >+ return $items_any_available if defined $items_any_available; > > my $any_available = ItemsAnyAvailableAndNotRestricted( { biblionumber => $item->biblionumber, patron => $patron }); > return $any_available ? 0 : 1; >-- >2.25.1
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 30697
:
134661
|
134666