Bugzilla – Attachment 18280 Details for
Bug 10304
Add avanced search filter for "not for loan" items
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10304 - Filter notforloan items when searching for only available items
Bug-10304---Filter-notforloan-items-when-searching.patch (text/plain), 2.03 KB, created by
Kyle M Hall (khall)
on 2013-05-21 19:51:38 UTC
(
hide
)
Description:
Bug 10304 - Filter notforloan items when searching for only available items
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2013-05-21 19:51:38 UTC
Size:
2.03 KB
patch
obsolete
>From 01c0debd20c963591791024b9731f88d374dfdff Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Tue, 21 May 2013 15:48:46 -0400 >Subject: [PATCH] Bug 10304 - Filter notforloan items when searching for only available items > >It does not make sense for the "available items only" search limit to >include results for items that are not for loan. > >Test Plan: >1) Catalog 3 records with 1 or more items each, make the first two > records' items available for loan, and the third record's items not for > loan. >2) Do a search limiting only to available items >3) Note all 3 records are in the search results >4) Apply this patch >5) Refresh the search results >6) Note the third record ( with only not for loan items ) is no longer > in the search results list. >--- > C4/Search.pm | 11 ++++++----- > 1 files changed, 6 insertions(+), 5 deletions(-) > >diff --git a/C4/Search.pm b/C4/Search.pm >index aec024b..092dae5 100644 >--- a/C4/Search.pm >+++ b/C4/Search.pm >@@ -1520,12 +1520,13 @@ sub buildQuery { > foreach my $this_limit (@limits) { > next unless $this_limit; > if ( $this_limit =~ /available/ ) { >-# >-## 'available' is defined as (items.onloan is NULL) and (items.itemlost = 0) >-## In English: >-## all records not indexed in the onloan register (zebra) and all records with a value of lost equal to 0 >+ >+ >+ # 'available' is defined as (items.onloan is NULL) and (items.itemlost = 0) and ( items.notforloan = 0 ) >+ # In English: >+ # all records not indexed in the onloan register (zebra) and all records with a value of lost equal to 0, and notforloan equal to 0 > $availability_limit .= >-"( ( allrecords,AlwaysMatches='' not onloan,AlwaysMatches='') and (lost,st-numeric=0) )"; #or ( allrecords,AlwaysMatches='' not lost,AlwaysMatches='')) )"; >+ "( ( allrecords,AlwaysMatches='' not onloan,AlwaysMatches='' ) and ( lost,st-numeric = 0 ) and ( notforloan,st-numeric = 0 ) )"; > $limit_cgi .= "&limit=available"; > $limit_desc .= ""; > } >-- >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 10304
:
18280
|
18350