Bugzilla – Attachment 187884 Details for
Bug 29908
Warning when empty ClaimReturnedWarningThreshold in patron_messages.inc
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29908: Remove warning when empty ClaimReturnedWarningThreshold in patron_messages.inc
Bug-29908-Remove-warning-when-empty-ClaimReturnedW.patch (text/plain), 3.90 KB, created by
Kyle M Hall (khall)
on 2025-10-14 11:33:58 UTC
(
hide
)
Description:
Bug 29908: Remove warning when empty ClaimReturnedWarningThreshold in patron_messages.inc
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2025-10-14 11:33:58 UTC
Size:
3.90 KB
patch
obsolete
>From 5cffb6640ec6e18fb941468061ae035747f6a2bc Mon Sep 17 00:00:00 2001 >From: Fridolin Somers <fridolin.somers@biblibre.com> >Date: Tue, 14 Oct 2025 12:00:11 +0200 >Subject: [PATCH] Bug 29908: Remove warning when empty > ClaimReturnedWarningThreshold in patron_messages.inc > >System preference ClaimReturnedWarningThreshold manages the display of a patron message in case of too many claims. >But this preference may be empty. It is created empty in installer/data/mysql/mandatory/sysprefs.sql. > >This generates a warning : >Argument "" isn't numeric in numeric gt (>) at /kohadevbox/koha/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc line 128. > >Test plan : >1) Set systempreference 'ClaimReturnedWarningThreshold' empty >2) Go to a patron details page >3) Check there is no warning in logs >4) Go to a patron check-out page >5) Check there is no warning in logs >6) Set systempreference 'ClaimReturnedWarningThreshold' with an integer (ie 5) >Repeat from 2) > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc | 2 +- > koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt | 2 +- > koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt | 2 +- > 3 files changed, 3 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc >index 25e05462e93..93ce0b53bed 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc >@@ -1,7 +1,7 @@ > [% USE raw %] > [% USE Branches %] > [% USE Categories %] >-[% SET ClaimReturnedWarningThreshold = Koha.Preference('ClaimReturnedWarningThreshold') %] >+[% SET ClaimReturnedWarningThreshold = Koha.Preference('ClaimReturnedWarningThreshold') || 0 %] > [% SET return_claims = patron.return_claims %] > [% SET logged_in_branchcode = Branches.GetLoggedInBranchcode() %] > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >index 92e438c86e2..f9adf4b7fdd 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >@@ -1088,7 +1088,7 @@ > var ClaimReturnedLostValue = "[% Koha.Preference('ClaimReturnedLostValue') | html %]"; > var ClaimReturnedChargeFee = "[% Koha.Preference('ClaimReturnedChargeFee') | html %]"; > var UnseenRenewals = "[% Koha.Preference('UnseenRenewals') | html %]"; >- var ClaimReturnedWarningThreshold = "[% Koha.Preference('ClaimReturnedWarningThreshold') | html %]"; >+ var ClaimReturnedWarningThreshold = "[% Koha.Preference('ClaimReturnedWarningThreshold') || 0 | html %]"; > var interface = "[% interface | html %]"; > var theme = "[% theme | html %]"; > var borrowernumber = "[% patron.borrowernumber | html %]"; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >index 565a0ed9d00..37eab01718d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >@@ -769,7 +769,7 @@ > var logged_in_user_borrowernumber = "[% logged_in_user.borrowernumber | html %]"; > var ClaimReturnedLostValue = "[% Koha.Preference('ClaimReturnedLostValue') | html %]"; > var ClaimReturnedChargeFee = "[% Koha.Preference('ClaimReturnedChargeFee') | html %]"; >- var ClaimReturnedWarningThreshold = "[% Koha.Preference('ClaimReturnedWarningThreshold') | html %]"; >+ var ClaimReturnedWarningThreshold = "[% Koha.Preference('ClaimReturnedWarningThreshold') || 0 | html %]"; > var UnseenRenewals = "[% Koha.Preference('UnseenRenewals') | html %]"; > var interface = "[% interface | html %]"; > var theme = "[% theme | html %]"; >-- >2.39.5 (Apple Git-154)
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 29908
:
187860
|
187884
|
189011