From c3642d51a12bab8ae63ce026325aca5c936c533f Mon Sep 17 00:00:00 2001 From: Aleisha Amohia Date: Thu, 7 Apr 2022 22:17:18 +0000 Subject: [PATCH] Bug 30488: Fix error when placing recall via OPAC This error occurs due to how UpdateStats is called in Koha/Recalls.pm To test: 1) Enable the UseRecalls system preference and set some random values in the recalls circulation and fines rules. 2) Find or create an item. Check this item out to Patron A. 3) Log in to the OPAC as Patron B. 4) Find the item you checked out to Patron A. Click the button to place a recall. 5) Fill out whatever details you like. Click the Submit button. This should trigger the error. 6) Apply the patch and refresh the page. 7) Confirm the recall has now been requested successfully. Sponsored-by: Catalyst IT Signed-off-by: Owen Leonard Signed-off-by: Marcel de Rooy Signed-off-by: Fridolin Somers --- Koha/Recalls.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Koha/Recalls.pm b/Koha/Recalls.pm index e7e360c2ec..ca6bf1090f 100644 --- a/Koha/Recalls.pm +++ b/Koha/Recalls.pm @@ -164,7 +164,7 @@ sub add_recall { $item = Koha::Items->find( $itemnumber ); # add to statistics table - UpdateStats({ + C4::Stats::UpdateStats({ branch => C4::Context->userenv->{'branch'}, type => 'recall', itemnumber => $itemnumber, -- 2.39.5