Bugzilla – Attachment 14158 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.67 KB, created by
Mirko Tietgen
on 2012-12-15 09:22:53 UTC
(
hide
)
Description:
Bug 6918 - can't place holds on 'on order' items with AllowOnShelfHolds off
Filename:
MIME Type:
Creator:
Mirko Tietgen
Created:
2012-12-15 09:22:53 UTC
Size:
2.67 KB
patch
obsolete
>From 48c7d832719c043812eb27a58bbf5c5af035cd32 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..fcae577 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 GetReserveStatus($itemnumber) eq "W" or $item->{notforloan} < 0)); > } > } > >diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl >index 5e432e1..fe162ce 100755 >--- a/opac/opac-detail.pl >+++ b/opac/opac-detail.pl >@@ -386,12 +386,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; >@@ -571,6 +569,8 @@ for my $itm (@items) { > } > } > >+$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