Bugzilla – Attachment 153641 Details for
Bug 32271
Overdue fines cap (amount) set to 0.00 when editing rule
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32271: (QA follow-up) Correction to 'can_be_blank' logic
Bug-32271-QA-follow-up-Correction-to-canbeblank-lo.patch (text/plain), 1.46 KB, created by
Martin Renvoize
on 2023-07-19 11:42:34 UTC
(
hide
)
Description:
Bug 32271: (QA follow-up) Correction to 'can_be_blank' logic
Filename:
MIME Type:
Creator:
Martin Renvoize
Created:
2023-07-19 11:42:34 UTC
Size:
1.46 KB
patch
obsolete
>From ee5d1c817b6b83d2852c2b5c1bc41bb8eb922f13 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Wed, 19 Jul 2023 12:31:14 +0100 >Subject: [PATCH] Bug 32271: (QA follow-up) Correction to 'can_be_blank' logic > >The logic introducing the can_be_blank check into the monetary decimal >format check was flawed and meant we were no longer checking decimal >formatting in the majority of cases. This patch updates that so we pass >the unit tests and correctly check any value passed that's not an empty >string. > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > Koha/CirculationRules.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/Koha/CirculationRules.pm b/Koha/CirculationRules.pm >index 97438f0e43..162395b3f6 100644 >--- a/Koha/CirculationRules.pm >+++ b/Koha/CirculationRules.pm >@@ -384,7 +384,7 @@ sub set_rule { > $rule_value = undef if defined $rule_value && $rule_value eq "" && !$can_be_blank; > my $is_monetary = defined $kind_info->{is_monetary} ? $kind_info->{is_monetary} : 0; > Koha::Exceptions::CirculationRule::NotDecimal->throw( name => $rule_name, value => $rule_value ) >- if ( $is_monetary && !$can_be_blank && defined($rule_value) && $rule_value !~ /^\d+(\.\d{2})?$/ ); >+ if ( $is_monetary && defined($rule_value) && $rule_value ne '' && $rule_value !~ /^\d+(\.\d{2})?$/ ); > > for my $v ( $branchcode, $categorycode, $itemtype ) { > $v = undef if $v and $v eq '*'; >-- >2.41.0
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 32271
:
144430
|
144528
|
153486
|
153487
|
153488
|
153489
|
153638
|
153639
|
153640
| 153641 |
153642