From 375f12493bb38e7c7f9f1438603e210bda9fb070 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Thu, 9 Nov 2017 11:53:29 -0300 Subject: [PATCH] Bug 7317: (QA followup) Remove MySQL-ism from Koha::Illrequest::_limit_counter This trivial fix changes the query syntax to avoid MySQL-isms. To test: - Run: $ kshell k$ prove t/db_dependent/Illrequests.t => SUCCESS: Tests pass! - Apply this patch - Run: k$ prove t/db_dependent/Illrequests.t => SUCCESS: Tests still pass! Signed-off-by: Tomas Cohen Arazi --- Koha/Illrequest.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Koha/Illrequest.pm b/Koha/Illrequest.pm index b6585c23ab..f7020ee984 100644 --- a/Koha/Illrequest.pm +++ b/Koha/Illrequest.pm @@ -793,7 +793,7 @@ sub _limit_counter { $resultset = Koha::Illrequests->search({ -and => [ %{$target}, - \"YEAR(placed) = YEAR(NOW())" + \"EXTRACT(YEAR FROM placed) = EXTRACT(YEAR FROM NOW())" ] }); } else { # assume 'active' -- 2.14.1