Bug 30488 - Error when placing a recall in the OPAC
Summary: Error when placing a recall in the OPAC
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P1 - high blocker (vote)
Assignee: Aleisha Amohia
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on: 19532
Blocks:
  Show dependency treegraph
 
Reported: 2022-04-07 13:44 UTC by Owen Leonard
Modified: 2022-12-12 21:24 UTC (History)
7 users (show)

See Also:
Change sponsored?: Sponsored
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.05.00


Attachments
Bug 30488: Fix error when placing recall via OPAC (1.31 KB, patch)
2022-04-07 22:26 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 30488: Fix error when placing recall via OPAC (1.36 KB, patch)
2022-04-11 10:52 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 30488: Fix error when placing recall via OPAC (1.46 KB, patch)
2022-04-15 06:59 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2022-04-07 13:44:50 UTC
I'm getting an error when placing a recall from the OPAC. It appears at the last stage, after clicking the submit button to place the recall.

Validation failed for type named Month declared in package DateTime::Types (/usr/lib/x86_64-linux-gnu/perl5/5.28/DateTime/Types.pm) at line 119 in sub named (eval) with value 29
Comment 1 Aleisha Amohia 2022-04-07 22:26:10 UTC
Created attachment 133095 [details] [review]
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
Comment 2 Owen Leonard 2022-04-11 10:52:14 UTC
Created attachment 133148 [details] [review]
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 <oleonard@myacpl.org>
Comment 3 Marcel de Rooy 2022-04-15 06:57:43 UTC
(In reply to Owen Leonard from comment #0)
> I'm getting an error when placing a recall from the OPAC. It appears at the
> last stage, after clicking the submit button to place the recall.
> 
> Validation failed for type named Month declared in package DateTime::Types
> (/usr/lib/x86_64-linux-gnu/perl5/5.28/DateTime/Types.pm) at line 119 in sub
> named (eval) with value 29

I'm crashing too but the error described does not come up. Instead I see:

Use of inherited AUTOLOAD for non-method Koha::Recalls::UpdateStats() is no longer allowed at /usr/share/koha/Koha/Recalls.pm line 168

And this message fits the suggested solution better ;)
Comment 4 Marcel de Rooy 2022-04-15 06:59:22 UTC
Created attachment 133341 [details] [review]
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 <oleonard@myacpl.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 5 Fridolin Somers 2022-04-20 07:24:11 UTC
Pushed to master for 22.05, thanks to everybody involved 🦄