Bugzilla – Attachment 72960 Details for
Bug 4812
Reserves for a specific copy of a book say book is available even though it it still checked out to someone else
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 4812: Reserves for a specific copy of a book say book is available even though it it still checked out
Bug-4812-Reserves-for-a-specific-copy-of-a-book-sa.patch (text/plain), 2.65 KB, created by
Kyle M Hall (khall)
on 2018-03-15 14:01:40 UTC
(
hide
)
Description:
Bug 4812: Reserves for a specific copy of a book say book is available even though it it still checked out
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2018-03-15 14:01:40 UTC
Size:
2.65 KB
patch
obsolete
>From 7ea119f80a3c1689e0a97e21c7819a8dc2fc95cd Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle.m.hall@gmail.com> >Date: Tue, 25 May 2010 11:44:46 -0400 >Subject: [PATCH] Bug 4812: Reserves for a specific copy of a book say book is > available even though it it still checked out > >When you place a reserve on a specific copy of a book a note is immediately put >on the card of the person for whom the book is being reserved that says the >book is available even though it is still checked out to someone else. > >The code is in placerequest.pl & opac-reserve.pl > >holdingbranch >if ($checkitem ne ''){ > $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'); > } >} > >This code does not bother to check to see if an item is actually on the shelf, >it sets it to 'W' reguardless. >--- > opac/opac-reserve.pl | 11 ++++++++--- > reserve/placerequest.pl | 2 +- > 2 files changed, 9 insertions(+), 4 deletions(-) > >diff --git a/opac/opac-reserve.pl b/opac/opac-reserve.pl >index 2be6991..5d4a370 100755 >--- a/opac/opac-reserve.pl >+++ b/opac/opac-reserve.pl >@@ -272,11 +272,16 @@ 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'); >+ unless ( >+ C4::Context->preference('ReservesNeedReturns') >+ || Koha::Checkouts->search( { itemnumber => $itemNum } )->count > 0 >+ || Koha::Holds->search( { itemnumber => $itemNum, priority => 0 } )->count > 0 >+ ) { >+ $rank = '0'; >+ $found = 'W'; >+ } > } > } > else { >diff --git a/reserve/placerequest.pl b/reserve/placerequest.pl >index 3c55656..a091a06 100755 >--- a/reserve/placerequest.pl >+++ b/reserve/placerequest.pl >@@ -78,7 +78,7 @@ if (defined $checkitem && $checkitem ne ''){ > my $item = $checkitem; > $item = GetItem($item); > if ( $item->{'holdingbranch'} eq $branch ){ >- $found = 'W' unless C4::Context->preference('ReservesNeedReturns'); >+ $found = 'W' unless ( C4::Context->preference('ReservesNeedReturns') || GetItemIssue($checkitem) ); > } > } > >-- >2.10.2
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 4812
:
2172
|
2173
|
3500
|
72960
|
72961
|
72962