Bugzilla – Attachment 1941 Details for
Bug 4245
Bestseller's Club and email notifications
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
enable multiple hold working with item-level_itype=ON
0001-4239-improved-enable-checking-of-CanHoldMultipleItem.patch (text/plain), 2.59 KB, created by
Chris Cormack
on 2010-04-24 21:40:00 UTC
(
hide
)
Description:
enable multiple hold working with item-level_itype=ON
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2010-04-24 21:40:00 UTC
Size:
2.59 KB
patch
obsolete
>From a7691d0a4d6dad60b34fc17083f3fd707dfee7b6 Mon Sep 17 00:00:00 2001 >From: Paul Poulain <paul.poulain@biblibre.com> >Date: Sat, 24 Apr 2010 23:37:29 +0200 >Subject: [PATCH] #4239 improved : enable checking of CanHoldMultipleItems at item-level >Content-Type: text/plain; charset="utf-8" > >previously, the feature was working only for libraries with item-level_itype is OFF > >with this patch, it works also with item-level_itype=ON >--- > opac/opac-reserve.pl | 16 +++++++++++++++- > 1 files changed, 15 insertions(+), 1 deletions(-) > >diff --git a/opac/opac-reserve.pl b/opac/opac-reserve.pl >index 2373465..47785f6 100755 >--- a/opac/opac-reserve.pl >+++ b/opac/opac-reserve.pl >@@ -340,6 +340,13 @@ foreach my $biblioNum (@biblionumbers) { > > $biblioLoopIter{itemLoop} = []; > my $numCopiesAvailable = 0; >+ # $canReserveMultiple is set to "yes" ( >0 ) if multiple items can be reserved >+ # it is set to 0 otherwise. depends on item-level_itypes syspref >+ # and the list of itypes that can be multiple reserved >+ my $canReserveMultiple=0; >+ unless (C4::Context->preference("item-level_itypes")) { >+ $canReserveMultiple = CanHoldMultipleItems($biblioLoopIter{itemtype}); >+ } > foreach my $itemInfo (@{$biblioData->{itemInfos}}) { > my $itemNum = $itemInfo->{itemnumber}; > my $itemLoopIter = {}; >@@ -354,6 +361,13 @@ foreach my $biblioNum (@biblionumbers) { > $itemLoopIter->{description} = $itemInfo->{description}; > $itemLoopIter->{imageurl} = $itemInfo->{imageurl}; > } >+ # check if the itype is one that can be multiple reserved >+ if (C4::Context->preference("item-level_itypes")) { >+ # sum canReserveMultiple : if at least one item can be multiple reserved, then the flag will be >0 >+ # FIXME : there can be complex & strange cases, where some items can be multiple reserved, and some can't >+ # this case is not managed. Note it may be only theoric, and have no real case >+ $canReserveMultiple = $canReserveMultiple+CanHoldMultipleItems($itemInfo->{itype}); >+ } > > # If the holdingbranch is different than the homebranch, we show the > # holdingbranch of the document too. >@@ -457,7 +471,7 @@ foreach my $biblioNum (@biblionumbers) { > $biblioLoopIter{bib_available} = 1; > $biblioLoopIter{holdable} = 1; > } >- if ( $biblioLoopIter{already_reserved} && !CanHoldMultipleItems($biblioLoopIter{itemtype}) ) { >+ if ( $biblioLoopIter{already_reserved} && !$canReserveMultiple ) { > $biblioLoopIter{holdable} = undef; > warn "Already_Reserved"; > } >-- >1.6.3.3 >
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 4245
:
1938
|
1939
|
1940
|
1941