Bug 31193 - API error when receiving orders
Summary: API error when receiving orders
Status: RESOLVED DUPLICATE of bug 30677
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: 21.11
Hardware: All All
: P5 - low minor (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-07-20 05:34 UTC by Aleisha Amohia
Modified: 2022-07-24 21:35 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Aleisha Amohia 2022-07-20 05:34:28 UTC
We've noticed that when receiving orders, we can't seem to filter the results using the search boxes in the pending orders table.

When we type in the 'summary search' filter for example, this error shows in the console:

GET https://toi-ohomai-admin.test.mykoha.co.nz/api/v1/acquisitions/orders?only_active=1&_page=1&_per_page=20&_match=contains&_order_by=+basket.name [HTTP/1.1 500 Internal Server Error 173ms]
DataTables warning: table id=pending_orders - Ajax error. For more information about this error, please see http://datatables.net/tn/7

And the API error log shows:

[2022/07/20 16:02:28] [ERROR] GET /api/v1/acquisitions/orders: unhandled exception (DBIx::Class::Exception)<<DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Unknown column 'biblioitem.title' in 'where clause' at /usr/share/perl5/Data/Page.pm line 50>> Koha::REST::Plugin::Exceptions::ANON /usr/share/koha/lib/Koha/REST/Plugin/Exceptions.pm (73)

The biblioitem.title field doesn't exist. I imagine this is something to do with the code in Koha/REST/V1/Acquisitions/Orders.pm

Can anyone else reproduce this bug? Do we know a fix?
Comment 1 Katrin Fischer 2022-07-24 21:35:27 UTC
Hi Aleisha, this looks like a duplicate of bug 30677.

*** This bug has been marked as a duplicate of bug 30677 ***