[Koha-patches] [PATCH] BUGFIX issuingrules : total for all itemtype was not properly calculated

Ryan Higgins ryan.higgins at liblime.com
Fri May 30 21:30:48 CEST 2008


This patch, in fixing the behavior, introduces an inconsistency in handling
'*'
between smartrules.pl and issuingrules.pl.

I would suggest that '*' should mean 'default' in all cases as it did before
this patch,
and that we instead add another character to test against for 'total'.

In either case, the language in smartrules needs to be changed in the
itemtype
dropdown from 'Any' to 'Total' or something to that effect so that the two
interfaces reflect the correct behavior.

But I would prefer to have both an 'any' and a 'total' for itemtypes.

Thoughts ?


On Wed, May 28, 2008 at 12:48 PM, <paul.poulain at biblibre.com> wrote:

> From: Paul POULAIN <paul.poulain at biblibre.com>
>
> diff --git a/C4/Circulation.pm b/C4/Circulation.pm
> index 0880c99..149674e 100644
> --- a/C4/Circulation.pm
> +++ b/C4/Circulation.pm
> @@ -445,7 +445,6 @@ sub TooMany {
>     $sth->execute( $cat_borrower, $type, $branch );
>     my $result = $sth->fetchrow_hashref;
>  #     warn "$cat_borrower, $type, $branch =
> ".Data::Dumper::Dumper($result);
> -
>     if ( $result->{maxissueqty} ne '' ) {
>  #         warn "checking on everything set";
>         $sth2->execute( $borrower->{'borrowernumber'}, $type );
> @@ -457,8 +456,8 @@ sub TooMany {
>         $sth->execute( $cat_borrower, '*', $branch );
>         my $result = $sth->fetchrow_hashref;
>         if ( $result->{maxissueqty} ne '' ) {
> -            $sth2->execute( $borrower->{'borrowernumber'}, $type );
> -            my $alreadyissued = $sth2->fetchrow;
> +            $sth3->execute( $borrower->{'borrowernumber'} );
> +            my $alreadyissued = $sth3->fetchrow;
>             if ( $result->{'maxissueqty'} <= $alreadyissued ) {
>                 return ( "$alreadyissued / ".( $result->{maxissueqty} + 0
> )." (rule on branch/category/total failed)"  );
>             }
> @@ -481,8 +480,8 @@ sub TooMany {
>         $sth->execute( '*', '*', $branch );
>         my $result = $sth->fetchrow_hashref;
>         if ( $result->{maxissueqty} ne '' ) {
> -            $sth2->execute( $borrower->{'borrowernumber'}, $type );
> -            my $alreadyissued = $sth2->fetchrow;
> +            $sth3->execute( $borrower->{'borrowernumber'} );
> +            my $alreadyissued = $sth3->fetchrow;
>             if ( $result->{'maxissueqty'} <= $alreadyissued ) {
>                 return ( "$alreadyissued / ".( $result->{maxissueqty} + 0
> )." (rule on branch / default category / total failed)" );
>             }
> @@ -505,8 +504,8 @@ sub TooMany {
>         $sth->execute( $cat_borrower, '*', '*' );
>         my $result = $sth->fetchrow_hashref;
>         if ( $result->{maxissueqty} ne '' ) {
> -            $sth2->execute( $borrower->{'borrowernumber'}, $type );
> -            my $alreadyissued = $sth2->fetchrow;
> +            $sth3->execute( $borrower->{'borrowernumber'} );
> +            my $alreadyissued = $sth3->fetchrow;
>             if ( $result->{'maxissueqty'} <= $alreadyissued ) {
>                 return ( "$alreadyissued / ".( $result->{maxissueqty} + 0
> )." (rule on default branch / category / total failed)"  );
>             }
> --
> 1.5.3.2
>
> _______________________________________________
> Koha-patches mailing list
> Koha-patches at lists.koha.org
> http://lists.koha.org/mailman/listinfo/koha-patches
>



-- 
Ryan Higgins

LibLime * Open-Source Solutions for Libraries
Featuring KohaZOOM ILS
888-564-2457 x704
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/koha-patches/attachments/20080530/0d7c3503/attachment-0003.htm>


More information about the Koha-patches mailing list