[Koha-patches] [PATCH 2/2] Fixes bug 4481: Limit to Available filters out many available items.

LAURENT Henri-Damien henridamien.laurent at biblibre.com
Wed May 19 01:08:21 CEST 2010


Le 19/05/2010 00:04, Ian Walls a écrit :
> From: Ian Walls <Ian.Walls at med.nyu.edu>
> 
> ---
>  C4/Search.pm |   25 ++++++++++++-------------
>  1 files changed, 12 insertions(+), 13 deletions(-)
> 
> diff --git a/C4/Search.pm b/C4/Search.pm
> index 229ee40..e7c9c76 100644
> --- a/C4/Search.pm
> +++ b/C4/Search.pm
> @@ -1256,21 +1256,20 @@ sub buildQuery {
>      my $group_OR_limits;
>      my $availability_limit;
>      foreach my $this_limit (@limits) {
> -#        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
> -#            $availability_limit .=
> -#"( ( allrecords,AlwaysMatches='' not onloan,AlwaysMatches='') and (lost,st-numeric=0) )"; #or ( allrecords,AlwaysMatches='' not lost,AlwaysMatches='')) )";
> -#            $limit_cgi  .= "&limit=available";
> -#            $limit_desc .= "";
> -#        }
> -#
> +        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
> +            $availability_limit .=
> +"( ( allrecords,AlwaysMatches='' not onloan,AlwaysMatches='') and (lost,st-numeric=0) )"; #or ( allrecords,AlwaysMatches='' not lost,AlwaysMatches='')) )";
> +            $limit_cgi  .= "&limit=available";
> +            $limit_desc .= "";
> +        }
> +
>          # group_OR_limits, prefixed by mc-
>          # OR every member of the group
> -#        elsif ( $this_limit =~ /mc/ ) {
> -        if ( $this_limit =~ /mc/ ) {
> +        elsif ( $this_limit =~ /mc/ ) {
>              $group_OR_limits .= " or " if $group_OR_limits;
>              $limit_desc      .= " or " if $group_OR_limits;
>              $group_OR_limits .= "$this_limit";
Hi Ian.
Nahuel will work on a real fix for availability.
Since at the moment customers are complaining (quite fairly) that
availability cannot be at biblio level but should rather be at item level.
And they are correct.
But When indexing elements only at biblio level, we cannot provide them
with the best accurate information.
So Nahuel already did some work on that.
But it need some improvement, which he will do soon.



More information about the Koha-patches mailing list