Bugzilla – Attachment 192526 Details for
Bug 41500
Expired hold charge value containing decimal with fraction dropped when editing a rule
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41500: Do not drop value from Expired hold charge containing decimal with fraction when editing a rule
0001-Bug-41500-Do-not-drop-value-from-Expired-hold-charge.patch (text/plain), 3.44 KB, created by
Emmi Takkinen
on 2026-02-05 11:01:31 UTC
(
hide
)
Description:
Bug 41500: Do not drop value from Expired hold charge containing decimal with fraction when editing a rule
Filename:
MIME Type:
Creator:
Emmi Takkinen
Created:
2026-02-05 11:01:31 UTC
Size:
3.44 KB
patch
obsolete
>From 826396200505054294ac102f6912601512613a5b Mon Sep 17 00:00:00 2001 >From: Emmi Takkinen <emmi.takkinen@koha-suomi.fi> >Date: Mon, 29 Dec 2025 10:26:15 +0200 >Subject: [PATCH] Bug 41500: Do not drop value from Expired hold charge > containing decimal with fraction when editing a rule > >When one edits a circulation rule where Expired hold charge value >contains decimal with fractions other than 0 (e.g. 1.30), value is >not copied to editing row. This happens because column is considered >as column which cannot contain nothing else than integer value and >is therefore left blank if fraction is used. > >To reproduce: >1. Add or modify existing circulation rule and set Expired hold charge value as 1.30. >2. Edit the rule you just created or modified. >=> Note that Expired hold charge is not displayed. >=> When saving the rule note that Expired hold charge is now overwritten with blank value. >3. Apply this patch. >4. Set Expired hold charge value as 1.30. >5. Edit the rule. >=> Note that Expired hold charge is now displayed correctly. > >Sponsored-by: Koha-Suomi Oy >--- > .../intranet-tmpl/prog/en/modules/admin/smart-rules.tt | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt >index 3742832e13..1d25b023f1 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt >@@ -1566,6 +1566,12 @@ > var cap_fine_to_replacement_price = $(this).find("input[type='checkbox']"); > $("#cap_fine_to_replacement_price").prop("checked", cap_fine_to_replacement_price.is(":checked")); > $("#overduefinescap").prop("disabled", cap_fine_to_replacement_price.is(":checked")); >+ } else if (current_input_id === "expire_reserves_charge") { >+ if (parseFloat(itm_text) || parseFloat(itm_text) == 0) { >+ $(current_column).find("input[type='text']").val(itm_text); >+ } else { >+ $(current_column).find("input[type='text']").val(""); >+ } > } else { > $(current_column).find("input[type='text']").val(itm_text); > // unformat prices >@@ -1605,7 +1611,6 @@ > current_input_id === "maxissueqty" || > current_input_id === "maxonsiteissueqty" || > current_input_id === "reservesallowed" || >- current_input_id === "expire_reserves_charge" || > current_input_id === "holds_per_day" || > current_input_id === "holds_per_record" || > current_input_id === "holds_pickup_period" >@@ -1613,7 +1618,6 @@ > // If the value is not an integer for > // - "Current checkouts allowed" > // - "Current on-site checkouts allowed" >- // - "Expired hold charge" > // - "Holds allowed (total)" > // - "Holds allowed (daily)" > // - "Holds per record (count)" >-- >2.34.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 41500
:
190753
| 192526