Bugzilla – Attachment 116719 Details for
Bug 27676
finesMode=off not correctly handled
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27676: Correct finesMode ne off condition
Bug-27676-Correct-finesMode-ne-off-condition.patch (text/plain), 1.66 KB, created by
Martin Renvoize (ashimema)
on 2021-02-11 13:29:49 UTC
(
hide
)
Description:
Bug 27676: Correct finesMode ne off condition
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2021-02-11 13:29:49 UTC
Size:
1.66 KB
patch
obsolete
>From 9c21c944f16e410666f78ca5770b6b217cb4a1ef Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 11 Feb 2021 11:21:43 +0100 >Subject: [PATCH] Bug 27676: Correct finesMode ne off condition > >finesMode is 'off' by default (sysprefs.sql), but if you modify its value from >the UI and set it to 'production' then back to 'off', the DB value becomes an >empty string '', because of $YAML::Syck::ImplicitTyping > >This has been found when working on on removing YAML::Syck (bug 22824), >so it's not perfect but the situation will be cleared in the follow-up >bug report. > >Test plan: >0. Don't apply the patch >1. reset_all >=> finesMode eq 'off' in DB >2. Set the pref's value to production >3. Switch it back to 'off' >4. Value is '' in DB >5. Check an item in that should generate overdue charges >=> Charges are not generated >6. Apply the patch >7. Check an item in that should generate overdue charges >=> Charges are generated > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > circ/returns.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/circ/returns.pl b/circ/returns.pl >index 4e9662024c..d9359a0b66 100755 >--- a/circ/returns.pl >+++ b/circ/returns.pl >@@ -87,7 +87,7 @@ my $userenv = C4::Context->userenv; > my $userenv_branch = $userenv->{'branch'} // ''; > my $forgivemanualholdsexpire = $query->param('forgivemanualholdsexpire'); > >-my $overduecharges = (C4::Context->preference('finesMode') && C4::Context->preference('finesMode') ne 'off'); >+my $overduecharges = (C4::Context->preference('finesMode') && C4::Context->preference('finesMode') eq 'production'); > > # Set up the item stack .... > my %returneditems; >-- >2.20.1
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 27676
:
116700
| 116719