Bug 30876 - recalls/recalls_to_pull.pl introduces an incorrect use of ->search in list context
Summary: recalls/recalls_to_pull.pl introduces an incorrect use of ->search in list co...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low critical (vote)
Assignee: Tomás Cohen Arazi
QA Contact: Aleisha Amohia
URL:
Keywords:
Depends on: 19532 29844
Blocks: 29734 30877 30885
  Show dependency treegraph
 
Reported: 2022-06-01 11:10 UTC by Tomás Cohen Arazi
Modified: 2023-06-08 22:26 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.11.00, 22.05.01


Attachments
Bug 30876: Fix wrong call to ->search in list context (1.09 KB, patch)
2022-06-01 11:22 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 30876: Fix wrong call to ->search in list context (1.17 KB, patch)
2022-06-01 11:59 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30876: Use Koha::Biblio (1.53 KB, patch)
2022-06-01 11:59 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30876: Use Koha::Biblio (1.53 KB, patch)
2022-06-01 13:29 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 30876: (follow-up) Use the $biblio object even further (1.83 KB, patch)
2022-06-01 13:29 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Tomás Cohen Arazi 2022-06-01 11:10:25 UTC

    
Comment 1 Tomás Cohen Arazi 2022-06-01 11:22:19 UTC
Created attachment 135534 [details] [review]
Bug 30876: Fix wrong call to ->search in list context

The code is clearly incorrect as ->search no longer returns a list when
called in list context.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 2 Jonathan Druart 2022-06-01 11:57:08 UTC
The error is: The method Koha::Items->can_be_waiting_recall is not covered by tests!
Comment 3 Jonathan Druart 2022-06-01 11:57:41 UTC
After patch:
DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Unknown column 'biblio_id' in 'where clause' at /kohadevbox/koha/Koha/Objects.pm line 394
Comment 4 Jonathan Druart 2022-06-01 11:59:35 UTC
Created attachment 135535 [details] [review]
Bug 30876: Fix wrong call to ->search in list context

The code is clearly incorrect as ->search no longer returns a list when
called in list context.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 5 Jonathan Druart 2022-06-01 11:59:39 UTC
Created attachment 135536 [details] [review]
Bug 30876: Use Koha::Biblio

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 6 Tomás Cohen Arazi 2022-06-01 13:29:53 UTC
Created attachment 135546 [details] [review]
Bug 30876: Use Koha::Biblio

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 7 Tomás Cohen Arazi 2022-06-01 13:29:58 UTC
Created attachment 135547 [details] [review]
Bug 30876: (follow-up) Use the $biblio object even further

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 8 Aleisha Amohia 2022-06-02 21:34:44 UTC
Code looks good, patch works, tests happy, passing QA
Comment 9 Tomás Cohen Arazi 2022-06-06 14:38:20 UTC
Pushed to master for 22.11.

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