Bugzilla – Attachment 95596 Details for
Bug 23964
An item level hold when placed is set to Waiting, if ReservesNeedReturn is set to Automatic
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23964: (follow-up) Add comments and improve readability
Bug-23964-follow-up-Add-comments-and-improve-reada.patch (text/plain), 1.71 KB, created by
Jonathan Druart
on 2019-11-20 09:06:27 UTC
(
hide
)
Description:
Bug 23964: (follow-up) Add comments and improve readability
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2019-11-20 09:06:27 UTC
Size:
1.71 KB
patch
obsolete
>From a52d879933c13a77db70180eae69f12f0dfc8dc7 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Wed, 6 Nov 2019 14:59:03 +0000 >Subject: [PATCH] Bug 23964: (follow-up) Add comments and improve readability > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > C4/Reserves.pm | 18 +++++++++++++++++- > 1 file changed, 17 insertions(+), 1 deletion(-) > >diff --git a/C4/Reserves.pm b/C4/Reserves.pm >index cf1da8be10..5057ec4ee9 100644 >--- a/C4/Reserves.pm >+++ b/C4/Reserves.pm >@@ -174,7 +174,23 @@ sub AddReserve { > # of the document, we force the value $priority and $found . > if ( $checkitem and not C4::Context->preference('ReservesNeedReturns') ) { > my $item = Koha::Items->find( $checkitem ); # FIXME Prevent bad calls >- if ( !$item->onloan && $item->holdingbranch eq $branch && ( $item->damaged && C4::Context->preference('AllowHoldsOnDamagedItems') || !$item->damaged ) && !$item->get_transfer && !$item->holds->count ) { >+ >+ if ( >+ # If item is already checked out, it cannot be set waiting >+ !$item->onloan >+ >+ # The item can't be waiting if it needs a transfer >+ && $item->holdingbranch eq $branch >+ >+ # Similaryly, if in transit it can't be waiting >+ && !$item->get_transfer >+ >+ # If we can't hold damaged items, and it is damaged, it can't be waiting >+ && ( $item->damaged && C4::Context->preference('AllowHoldsOnDamagedItems') || !$item->damaged ) >+ >+ # Lastly, if this already has holds, we shouldn't make it waiting for the new hold >+ && !$item->holds->count ) >+ { > $priority = 0; > $found = 'W'; > } >-- >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 23964
:
95016
|
95017
|
95021
|
95022
|
95111
|
95249
|
95544
|
95594
|
95595
|
95596
|
95597
|
95598
|
95599
|
95639
|
95640
|
95641
|
95642
|
95643
|
95644
|
95780
|
95781