Bugzilla – Attachment 75308 Details for
Bug 20724
ReservesNeedReturns syspref breaks "Holds awaiting pickup"
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20724: Move the ReservesNeedReturns logic to AddReserve
Bug-20724-Move-the-ReservesNeedReturns-logic-to-Ad.patch (text/plain), 2.86 KB, created by
Victor Grousset/tuxayo
on 2018-05-14 14:45:07 UTC
(
hide
)
Description:
Bug 20724: Move the ReservesNeedReturns logic to AddReserve
Filename:
MIME Type:
Creator:
Victor Grousset/tuxayo
Created:
2018-05-14 14:45:07 UTC
Size:
2.86 KB
patch
obsolete
>From 394165b38d869c674c813d8591a9ae688fd8a460 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 10 May 2018 11:40:11 -0300 >Subject: [PATCH] Bug 20724: Move the ReservesNeedReturns logic to AddReserve > >Signed-off-by: Victor Grousset <victor.grousset@biblibre.com> >--- > C4/Reserves.pm | 10 ++++++++++ > opac/opac-reserve.pl | 6 ------ > reserve/placerequest.pl | 12 ------------ > 3 files changed, 10 insertions(+), 18 deletions(-) > >diff --git a/C4/Reserves.pm b/C4/Reserves.pm >index a919f75..c0a977f 100644 >--- a/C4/Reserves.pm >+++ b/C4/Reserves.pm >@@ -171,6 +171,16 @@ sub AddReserve { > > $expdate = output_pref({ str => $expdate, dateonly => 1, dateformat => 'iso' }); > >+ # if we have an item selectionned, and the pickup branch is the same as the holdingbranch >+ # of the document, we force the value $priority and $found . >+ if ( $checkitem and not C4::Context->preference('ReservesNeedReturns') ) { >+ $priority = 0; >+ my $item = Koha::Items->find( $checkitem ); # FIXME Prevent bad calls >+ if ( $item->holdingbranch eq $branch ) { >+ $found = 'W'; >+ } >+ } >+ > if ( C4::Context->preference('AllowHoldDateInFuture') ) { > > # Make room in reserves for this before those of a later reserve date >diff --git a/opac/opac-reserve.pl b/opac/opac-reserve.pl >index 4a0dbb9..c290ea4 100755 >--- a/opac/opac-reserve.pl >+++ b/opac/opac-reserve.pl >@@ -272,12 +272,6 @@ if ( $query->param('place_reserve') ) { > my $rank = $biblioData->{rank}; > if ( $itemNum ne '' ) { > $canreserve = 1 if CanItemBeReserved( $borrowernumber, $itemNum ) eq 'OK'; >- $rank = '0' unless C4::Context->preference('ReservesNeedReturns'); >- my $item = GetItem($itemNum); >- if ( $item->{'holdingbranch'} eq $branch ) { >- $found = 'W' >- unless C4::Context->preference('ReservesNeedReturns'); >- } > } > else { > $canreserve = 1 if CanBookBeReserved( $borrowernumber, $biblioNum ) eq 'OK'; >diff --git a/reserve/placerequest.pl b/reserve/placerequest.pl >index 3c55656..351041b 100755 >--- a/reserve/placerequest.pl >+++ b/reserve/placerequest.pl >@@ -70,18 +70,6 @@ foreach my $bibnum (@biblionumbers) { > > my $found; > >-# if we have an item selectionned, and the pickup branch is the same as the holdingbranch >-# of the document, we force the value $rank and $found . >-if (defined $checkitem && $checkitem ne ''){ >- $holds_to_place_count = 1; >- $rank[0] = '0' unless C4::Context->preference('ReservesNeedReturns'); >- my $item = $checkitem; >- $item = GetItem($item); >- if ( $item->{'holdingbranch'} eq $branch ){ >- $found = 'W' unless C4::Context->preference('ReservesNeedReturns'); >- } >-} >- > if ( $type eq 'str8' && $borrower ) { > > foreach my $biblionumber ( keys %bibinfos ) { >-- >2.7.4
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 20724
:
75211
|
75219
|
75221
|
75222
|
75223
|
75307
|
75308
|
75309
|
75325
|
75363
|
75364
|
75365
|
75366
|
75367