[Koha-bugs] [Bug 25220] maxoutstanding syspref should be disabled by a null value

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri May 8 11:22:12 CEST 2020


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25220

Marcel de Rooy <m.de.rooy at rijksmuseum.nl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Signed Off                  |Failed QA
                 CC|                            |m.de.rooy at rijksmuseum.nl

--- Comment #9 from Marcel de Rooy <m.de.rooy at rijksmuseum.nl> ---
C4/SIP/ILS/Patron.pm:          && $self->fee_amount >
C4::Context->preference("maxoutstanding") );
circ/offline.pl:$template->{'VARS'}->{'maxoutstanding'} =
circ/offline.pl:  C4::Context->preference('maxoutstanding') || 0;
installer/data/mysql/atomicupdate/bug_25220.perl:    $dbh->do( "UPDATE
systempreferences set value=0 where variable='maxoutstanding' and (value='' or
value is null)" );
installer/data/mysql/atomicupdate/bug_25220.perl:    NewVersion( $DBversion,
25220, "maxoutstanding should be disabled by a null value");
installer/data/mysql/sysprefs.sql:('maxoutstanding','5','','maximum amount
withstanding to be able make holds','Integer'),
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref:    
       - pref: maxoutstanding
koha-tmpl/intranet-tmpl/prog/en/modules/circ/offline.tt:                if
(parseInt(patron.fine) > [% maxoutstanding | html %]) {
koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt:                    
               [% IF amount_outstanding && Koha.Preference('maxoutstanding') &&
amount_outstanding > Koha.Preference('maxoutstanding') %]
koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt:                [%
IF ( expiry || diffbranch || patron.is_debarred || ( amount_outstanding &&
Koha.Preference('maxoutstanding') && amount_outstanding >
Koha.Preference('maxoutstanding') ) ) %]
koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt:                    
       [% IF amount_outstanding && Koha.Preference('maxoutstanding') &&
amount_outstanding > Koha.Preference('maxoutstanding') %]


opac/opac-reserve.pl:my $maxoutstanding =
C4::Context->preference("maxoutstanding");
opac/opac-reserve.pl:$maxoutstanding = undef unless
looks_like_number($maxoutstanding);
opac/opac-reserve.pl:$template->param( noreserve => 1 ) unless $maxoutstanding;
opac/opac-reserve.pl:if ( $amountoutstanding && defined($maxoutstanding) &&
($amountoutstanding > $maxoutstanding) ) {
opac/opac-user.pl:my $maxoutstanding =
C4::Context->preference('maxoutstanding');
opac/opac-user.pl:$maxoutstanding = undef unless looks_like_number (
$maxoutstanding );
opac/opac-user.pl:if ( $amountoutstanding && defined($maxoutstanding) && (
$amountoutstanding > $maxoutstanding ) ){

Are you sure that you only needed to change opac-reserve and opac-user ? If I
am looking at this git grep, I wouldnt.
Also note that the test Koha.Pref( ) && a > b, looks a bit more elegant,
although it could trigger warnings on non-numerical comparison if you wrote
"abc" in maxoutstanding. But who would?

+    $dbh->do( "UPDATE systempreferences set value=0 where
variable='maxoutstanding' and (value='' or value is null)" );
This does not look good. Value is a text field. You mean '0'? :)
I think we dont need this change. And also you dont correct 'abc'?

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list