Bug 30885 - Recall - detail page explosion
Summary: Recall - detail page explosion
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low critical (vote)
Assignee: Aleisha Amohia
QA Contact: Katrin Fischer
URL:
Keywords:
Depends on: 19532 30876
Blocks: 27272 29734
  Show dependency treegraph
 
Reported: 2022-06-02 09:01 UTC by Jonathan Druart
Modified: 2022-06-21 13:45 UTC (History)
6 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.11.00, 22.05.01


Attachments
Bug 30885: Display recall data correctly (2.80 KB, patch)
2022-06-02 21:27 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 30885: Display recall data correctly (2.85 KB, patch)
2022-06-03 14:16 UTC, David Nind
Details | Diff | Splinter Review
Bug 30885: Display recall data correctly (2.92 KB, patch)
2022-06-06 10:17 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2022-06-02 09:01:15 UTC
If you have a recall on a bibliographic record, its detail page explode with:

Template process failed: undef error - The method Koha::Recall->waitingdate is not covered by tests!

Then, if you fix the typo:
Template process failed: undef error - The method Koha::Recall->borrowernumber is not covered by tests!

And then it's fun...
Comment 1 Aleisha Amohia 2022-06-02 21:27:31 UTC
Created attachment 135631 [details] [review]
Bug 30885: Display recall data correctly

This page does not pull the recall columns correctly.

To test:
1) Enable the UseRecalls system preference and set up your
recalls-related circulation rules.
2) Check out an item to Patron B.
3) Log into the OPAC as Patron A and search for the item.
4) Place an item-level recall on that item.
5) Go back to the OPAC and search for the item. Confirm that when you go
to the record detail page, it explodes and errors are shown.
6) Apply patch and refresh page.
7) Confirm page loads as expected.
8) Check the Status information for the item in the Holdings table.
Confirm it shows the recall information correctly.
9) Check in the item and confirm the recall as waiting for Patron A.
10) Go back to the record detail page and confirm the Status information
for the item shows as Waiting in the Holdings table.

Sponsored-by: Catalyst IT
Comment 2 David Nind 2022-06-03 14:16:29 UTC
Created attachment 135681 [details] [review]
Bug 30885: Display recall data correctly

This page does not pull the recall columns correctly.

To test:
1) Enable the UseRecalls system preference and set up your
recalls-related circulation rules.
2) Check out an item to Patron B.
3) Log into the OPAC as Patron A and search for the item.
4) Place an item-level recall on that item.
5) Go back to the OPAC and search for the item. Confirm that when you go
to the record detail page, it explodes and errors are shown.
6) Apply patch and refresh page.
7) Confirm page loads as expected.
8) Check the Status information for the item in the Holdings table.
Confirm it shows the recall information correctly.
9) Check in the item and confirm the recall as waiting for Patron A.
10) Go back to the record detail page and confirm the Status information
for the item shows as Waiting in the Holdings table.

Sponsored-by: Catalyst IT

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 David Nind 2022-06-03 15:26:04 UTC
Testing notes (using koha-testing-docker):

1. Step 5: this should be the staff interface.

2. If there are no transfers required, things all work as expected (that is, Patron A + B and item are all in the same library).

3. However, if the patrons are in different libraries and transfers are required, I had an error on the transfers to receive page:
   (a) Used Mary Burton as Patron B (Midway), and Henry Acevedo as Patron A (Midway), and Programming Perl (record #262).
   (b) Follow the test plan to step 9, then changed library to Midway
   (c) Go to Circulation > Transfers > Transfers to receive
   (d) Get error trace - see details below under errors > 3(d)

4. When cancelling/reverting the hold (after following the test plan to step 9 for a, b, c, and d), I noticed these issues - I presume these should be a separate bug(s):
   (a) Recalls tab on the item details page (staff interface): nothing happens when you click on 'Cancel recall and return to Centerville' (can cancel by clicking the check box and selecting the 'Cancel selected recalls' button).
   (b) Go to Circulation > Recalls > Recalls queue: nothing happens when you click on 'Cancel recall and return to: Centerville' (can cancel by clicking the check box and selecting the 'Cancel selected recalls' button).
   (c) Go to the patron details section for Henry and then select the Recalls tab: nothing happens when you click on Actions > 'Cancel recall and return to: Centerville'.
   (d) Go to Circulation > Recalls > Recalls to pull > select Cancel recall and return to: Centerville: get error - see details below under errors > 4(d)

Errors
-------

3(d) - Change library to Midway: Circulation > Transfers > Transfers to receive
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Template process failed: undef error - The method Koha::Recall->borrowernumber is not covered by tests!

Trace begun at /kohadevbox/koha/Koha/Object.pm line 875
Koha::Object::AUTOLOAD('Koha::Recall=HASH(0x5566df86c340)') called at /kohadevbox/koha/koha-tmpl/intranet-tmpl/prog/en/modules/circ/transferstoreceive.tt line 93
eval {...} at /kohadevbox/koha/koha-tmpl/intranet-tmpl/prog/en/modules/circ/transferstoreceive.tt line 93
.....

4(d) - Circulation > Recalls > Recalls to pull > select 'Cancel recall and return to: Centerville'
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Data truncated for column 'reason' at row 1 at /kohadevbox/koha/Koha/Object.pm line 170
 at /usr/share/perl5/DBIx/Class/Exception.pm line 77

    in DBIx::Class::Exception::throw at /usr/share/perl5/DBIx/Class/Exception.pm line 77
Comment 4 Katrin Fischer 2022-06-06 10:17:14 UTC
Created attachment 135706 [details] [review]
Bug 30885: Display recall data correctly

This page does not pull the recall columns correctly.

To test:
1) Enable the UseRecalls system preference and set up your
recalls-related circulation rules.
2) Check out an item to Patron B.
3) Log into the OPAC as Patron A and search for the item.
4) Place an item-level recall on that item.
5) Go back to the staff interface and search for the item. Confirm that when you go
to the record detail page, it explodes and errors are shown.
6) Apply patch and refresh page.
7) Confirm page loads as expected.
8) Check the Status information for the item in the Holdings table.
Confirm it shows the recall information correctly.
9) Check in the item and confirm the recall as waiting for Patron A.
10) Go back to the record detail page and confirm the Status information
for the item shows as Waiting in the Holdings table.

Sponsored-by: Catalyst IT

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 5 Tomás Cohen Arazi 2022-06-06 14:38:31 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!
Comment 6 Lucas Gass 2022-06-15 16:11:48 UTC
Pushed to 22.05.x for 22.05.01
Comment 7 Arthur Suzuki 2022-06-21 13:45:34 UTC
depends on recalls, not available in 21.11. won't backport