From d246cc9e7a1f46235e157108104124b0f168b804 Mon Sep 17 00:00:00 2001
From: Kyle M Hall <kyle@bywatersolutions.com>
Date: Mon, 9 Mar 2020 09:33:54 -0400
Subject: [PATCH] Bug 24829: ClaimReturnedWarningThreshold is always triggered
 if patron has one or more claims

ClaimReturnedWarningThreshold is supposed to display a warning if a patron has more than the number of claims specified in the system preference. Currently the warning is displayed for any number of claims over zero.

Test Plan:
1) Make 3 return claims for a patron
2) Set ClaimReturnedWarningThreshold to 4
3) Note the claims warning displays for the patron on circulation.pl
4) Apply this patch
5) Reload circulation.pl, the warning should go away
6) Set ClaimReturnedWarningThreshold to 2
7) Reload the page, the warning should reappear
---
 koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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 1eeb19e3af..9a32874f6b 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt
@@ -744,7 +744,7 @@
 
                                     [% SET ClaimReturnedWarningThreshold = Koha.Preference('ClaimReturnedWarningThreshold') %]
                                     [% SET return_claims = patron.return_claims %]
-                                    [% IF return_claims.count %]
+                                    [% IF return_claims.count > ClaimReturnedWarningThreshold %]
                                         <li><span class="circ-hlt return-claims">Return claims: Patron has [% return_claims.count | html %] RETURN CLAIMS.</span>
                                     [% END %]
 
-- 
2.21.1 (Apple Git-122.3)