Bugzilla – Attachment 14390 Details for
Bug 6918
Can't place holds on 'on order' items with AllowOnShelfHolds off
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 6918 - can't place holds on 'on order' items with AllowOnShelfHolds off
Bug-6918---cant-place-holds-on-on-order-items-with.patch (text/plain), 2.73 KB, created by
Kyle M Hall (khall)
on 2013-01-03 13:06:51 UTC
(
hide
)
Description:
Bug 6918 - can't place holds on 'on order' items with AllowOnShelfHolds off
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2013-01-03 13:06:51 UTC
Size:
2.73 KB
patch
obsolete
>From c81c59e2335785a8ff364c846e7d0d8f099363ce Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Tue, 11 Dec 2012 11:09:49 -0500 >Subject: [PATCH] Bug 6918 - can't place holds on 'on order' items with AllowOnShelfHolds off > >Koha documenation suggests that NOT_LOAN values less than 0 should be >hold-able. This patch enables that. > >From the manual: >Negative number values will still allow holds (use for on order statuses for example) >where as positive numbers will not allow holds or checkouts > >Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> >Works as expected >--- > C4/Reserves.pm | 2 +- > opac/opac-detail.pl | 10 +++++----- > 2 files changed, 6 insertions(+), 6 deletions(-) > >diff --git a/C4/Reserves.pm b/C4/Reserves.pm >index a380bf0..62df806 100644 >--- a/C4/Reserves.pm >+++ b/C4/Reserves.pm >@@ -1441,7 +1441,7 @@ sub IsAvailableForItemLevelRequest { > if (C4::Context->preference('AllowOnShelfHolds')) { > return $available_per_item; > } else { >- return ($available_per_item and ($item->{onloan} or GetReserveStatus($itemnumber) eq "W")); >+ return ($available_per_item and ($item->{onloan} or $item->{notforloan} < 0 or GetReserveStatus($itemnumber) eq "W" )); > } > } > >diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl >index 22c922b..fbb6497 100755 >--- a/opac/opac-detail.pl >+++ b/opac/opac-detail.pl >@@ -387,12 +387,8 @@ if ($session->param('busc')) { > } > } > >- >- > $template->param( 'AllowOnShelfHolds' => C4::Context->preference('AllowOnShelfHolds') ); >-$template->param( 'ItemsIssued' => CountItemsIssued( $biblionumber ) ); >- >- >+my $count_items_issued = CountItemsIssued( $biblionumber ); # If AllowOnShelfHolds is disabled, at least one item must be either issued or have a negative not for loan status > > $template->param('OPACShowCheckoutName' => C4::Context->preference("OPACShowCheckoutName") ); > $template->param('OPACShowBarcode' => C4::Context->preference("OPACShowBarcode") ); >@@ -529,6 +525,8 @@ for my $itm (@items) { > && (not $itemtypes->{$itm->{'itype'}}->{notforloan} ) > && ($itm->{'itemnumber'} ) ); > >+ $count_items_issued++ if ( $itm->{'itemnotforloan'} < 0 ); ## Not for loan items with negative values should count as issued items for the purpose of holdability >+ > if ( defined $itm->{'publictype'} ) { > # I can't actually find any case in which this is defined. --amoore 2008-12-09 > $itm->{ $itm->{'publictype'} } = 1; >@@ -589,6 +587,8 @@ if (scalar(@itemloop) >= 50 && !$viewallitems) { > $template->param('lotsofitems' => 1); > } > >+$template->param( 'ItemsIssued' => $count_items_issued ); >+ > ## get notes and subjects from MARC record > my $dbh = C4::Context->dbh; > my $marcnotesarray = GetMarcNotes ($record,$marcflavour); >-- >1.7.2.5
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 6918
:
14004
|
14152
|
14158
|
14390
|
14451
|
15077
|
19087
|
68898
|
68934
|
70232
|
102998
|
103016
|
103020
|
103021
|
103175
|
103179
|
105390
|
105473
|
105474