Bugzilla – Attachment 13235 Details for
Bug 8975
search results should say on order in staff client
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 8975 - search results should say on order in staff client
Bug-8975---search-results-should-say-on-order-in-s.patch (text/plain), 3.20 KB, created by
Owen Leonard
on 2012-11-02 15:53:20 UTC
(
hide
)
Description:
Bug 8975 - search results should say on order in staff client
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2012-11-02 15:53:20 UTC
Size:
3.20 KB
patch
obsolete
>From cbbed33b1c0cf94c0232c093c6d0ec15c493e206 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Fri, 2 Nov 2012 11:40:52 -0400 >Subject: [PATCH] Bug 8975 - search results should say on order in staff > client >Content-Type: text/plain; charset="utf-8" > >In order to allow holds on items with notforloan = -1, processing >of "unavailable" items in Search.pm was altered to exclude items >with notforloan < 0. (See Bug 2341: items marked 'on order' not > reserveable from search results). Doing so meant that such items >were excluded from the list, in staff client search results, of >items which are unavailable. > >This patch changes the logic of that processing so that items >with notforloan < 0 are considered unavailable, but can still >be placed on hold. > >To test, edit a record with a single item and view that record >in search results. When the item is is on order (notforloan -1) >it should say so. The holds link should be INactive only if: > >- item is withdrawn AND/OR >- item is lost AND/OR >- item is damaged (and AllowHoldsOnDamagedItems is off) AND/OR >- item is not for loan, with notforloan > 0 >--- > C4/Search.pm | 24 +++++++++++++++++------- > 1 file changed, 17 insertions(+), 7 deletions(-) > >diff --git a/C4/Search.pm b/C4/Search.pm >index 3a63fcd..94aa672 100644 >--- a/C4/Search.pm >+++ b/C4/Search.pm >@@ -1837,7 +1837,7 @@ sub searchResults { > if ( $item->{wthdrawn} > || $item->{itemlost} > || $item->{damaged} >- || $item->{notforloan} > 0 >+ || $item->{notforloan} > || $reservestatus eq 'Waiting' > || ($transfertwhen ne '')) > { >@@ -1849,13 +1849,23 @@ sub searchResults { > $item->{status} = $item->{wthdrawn} . "-" . $item->{itemlost} . "-" . $item->{damaged} . "-" . $item->{notforloan}; > > # can place hold on item ? >- if ((!$item->{damaged} || C4::Context->preference('AllowHoldsOnDamagedItems')) >- && !$item->{itemlost} >- && !$item->{withdrawn} >- ) { >- $can_place_holds = 1; >+ if ( !$item->{itemlost} ) { >+ if ( !$item->{wthdrawn} ){ >+ if ( $item->{damaged} ){ >+ if ( C4::Context->preference('AllowHoldsOnDamagedItems') ){ >+ # can place a hold on a damaged item if AllowHoldsOnDamagedItems is true >+ if ( ( !$item->{notforloan} || $item->{notforloan} < 0 ) ){ >+ # item is either for loan or has notforloan < 0 >+ $can_place_holds = 1; >+ } >+ } >+ } elsif ( $item->{notforloan} < 0 ) { >+ # item is not damaged and notforloan is < 0 >+ $can_place_holds = 1; >+ } >+ } > } >- >+ > $other_count++; > > my $key = $prefix . $item->{status}; >-- >1.7.9.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 8975
:
13084
|
13235
|
13237