Bugzilla – Attachment 96099 Details for
Bug 24168
Errors with use of CanItemBeReserved return value
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24168: (bug 23116 follow-up) AllowHoldPolicyOverride allows a librarian to almost place a hold on an item already on hold
Bug-24168-bug-23116-follow-up-AllowHoldPolicyOverr.patch (text/plain), 2.00 KB, created by
Marcel de Rooy
on 2019-12-09 12:55:12 UTC
(
hide
)
Description:
Bug 24168: (bug 23116 follow-up) AllowHoldPolicyOverride allows a librarian to almost place a hold on an item already on hold
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2019-12-09 12:55:12 UTC
Size:
2.00 KB
patch
obsolete
>From 6db3a97a43a3dae76ad27adda2712f8f92e1665a Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 4 Dec 2019 16:04:45 +0100 >Subject: [PATCH] Bug 24168: (bug 23116 follow-up) AllowHoldPolicyOverride > allows a librarian to almost place a hold on an item already on hold >Content-Type: text/plain; charset=utf-8 > >This patch actually fixes the issue described on bug 23116. > >Test plan: >See bug 23116. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >See also comment5. Important to note that the later comparison with >itemAlreadyOnHold assumes that the variable is a string. >--- > reserve/request.pl | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > >diff --git a/reserve/request.pl b/reserve/request.pl >index c5014820f6..4f80b8d5b9 100755 >--- a/reserve/request.pl >+++ b/reserve/request.pl >@@ -548,8 +548,8 @@ foreach my $biblionumber (@biblionumbers) { > > $item->{'holdallowed'} = $branchitemrule->{'holdallowed'}; > >- my $can_item_be_reserved = CanItemBeReserved( $patron->borrowernumber, $itemnumber, $pickup ); >- $item->{not_holdable} = $can_item_be_reserved->{status} unless ( $can_item_be_reserved->{status} eq 'OK' ); >+ my $can_item_be_reserved = CanItemBeReserved( $patron->borrowernumber, $itemnumber, $pickup )->{status}; >+ $item->{not_holdable} = $can_item_be_reserved unless $can_item_be_reserved eq 'OK'; > > $item->{item_level_holds} = Koha::IssuingRules->get_opacitemholds_policy( { item => $item_object, patron => $patron } ); > >@@ -557,7 +557,7 @@ foreach my $biblionumber (@biblionumbers) { > !$item->{cantreserve} > && !$exceeded_maxreserves > && IsAvailableForItemLevelRequest($item_object, $patron) >- && $can_item_be_reserved->{status} eq 'OK' >+ && $can_item_be_reserved eq 'OK' > ) > { > $item->{available} = 1; >-- >2.11.0
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 24168
:
95994
| 96099