[Bug 25220] New: maxoutstanding syspref should be disabled by a null value
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25220 Bug ID: 25220 Summary: maxoutstanding syspref should be disabled by a null value Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Hold requests Assignee: koha-bugs@lists.koha-community.org Reporter: andrew@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com Several fines-related system preferences (OPACFineNoRenewals, noissuescharge, etc) can be disabled by leaving them blank. But maxoutstanding treats a blank as a zero, blocking OPAC holds for *any* fine balance. I'd like this to change to match the functionality of the other sysprefs. If nothing else, we should add some language to say a blank is treated as a zero. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25220 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |25219 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25219 [Bug 25219] Include note in fines-related system preferences which can be disabled by leaving them blank -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25220 --- Comment #1 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- To Test: 1) Set maxoutstanding to blank 2) give yourself $0.50 in fines 3) go to opac, confirm you're blocked from placing holds 4) set maxoutstanding=1 5) confirm you are no longer blocked from placing holds -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25220 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25220 --- Comment #2 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 103377 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=103377&action=edit Bug 25220: maxoutstanding ignored if null in opac-reserve.pl To Test: 1) set maxoutstanding to empty 2) give yourself a fine of $1 3) try to place a hold on the opac 4) confirm you cannot place hold 5) apply patch, restart_all 6) reload opac 7) confirm hold is allowed 8) set maxoutstanding to $2 9) confirm hold is now blocked -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25220 --- Comment #3 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 103378 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=103378&action=edit Bug 25220: make maxoutstanding set to null not give warning on opac-user.pl To test: 1) set maxoutstanding to empty 2) give yourself $1 in fine 3) go to your account on OPAC 4) confirm you have message that holds are blocked 5) apply patch, restart_all 6) reload OPAC 7) confirm message is gone 8) set maxoutstanding to $2 9) reload opac, confirm message is back -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25220 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |ASSIGNED -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25220 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff --- Comment #4 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Correcting / consolidating test plan: To test: 1) set maxoutstanding to empty 2) give yourself $1 in fine 3) go to your account on OPAC 4) confirm you have message that holds are blocked 5) try to place a hold on opac 6) confirm hold is blocked 7) apply patch, restart_all 8) reload OPAC 9) confirm you can now place a hold 10) confirm message on your account is gone 11) set maxoutstanding to $.5 12) reload opac 13) confirm you are blocked from hold 14) confirm message on account is back -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25220 --- Comment #5 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 103388 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=103388&action=edit Bug 25220: atomicupdate to maintain behavior of existing installs To test: 1) on an existing install, set maxoutstanding to null 2) apply patch 3) confirm maxoutstanding is now set to zero -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25220 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |andrew@bywatersolutions.com |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25220 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25220 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #103377|0 |1 is obsolete| | Attachment #103378|0 |1 is obsolete| | Attachment #103388|0 |1 is obsolete| | --- Comment #6 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 104506 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=104506&action=edit Bug 25220: maxoutstanding ignored if null in opac-reserve.pl To Test: 1) set maxoutstanding to empty 2) give yourself a fine of $1 3) try to place a hold on the opac 4) confirm you cannot place hold 5) apply patch, restart_all 6) reload opac 7) confirm hold is allowed 8) set maxoutstanding to $2 9) confirm hold is now blocked Signed-off-by: Owen Leonard <oleonard@myacpl.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25220 --- Comment #7 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 104507 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=104507&action=edit Bug 25220: make maxoutstanding set to null not give warning on opac-user.pl To test: 1) set maxoutstanding to empty 2) give yourself $1 in fine 3) go to your account on OPAC 4) confirm you have message that holds are blocked 5) apply patch, restart_all 6) reload OPAC 7) confirm message is gone 8) set maxoutstanding to $2 9) reload opac, confirm message is back Signed-off-by: Owen Leonard <oleonard@myacpl.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25220 --- Comment #8 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 104508 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=104508&action=edit Bug 25220: atomicupdate to maintain behavior of existing installs To test: 1) on an existing install, set maxoutstanding to null 2) apply patch 3) confirm maxoutstanding is now set to zero Amended during signoff: Corrected atomicupdate file extension from .pl to .perl. Signed-off-by: Owen Leonard <oleonard@myacpl.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25220 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA CC| |m.de.rooy@rijksmuseum.nl --- Comment #9 from Marcel de Rooy <m.de.rooy@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.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25220 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25220 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25220 Andrew Fuerste-Henry <andrewfh@dubcolib.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|andrewfh@dubcolib.org |koha-bugs@lists.koha-commun | |ity.org -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org