[Bug 42591] New: current_item_level_holds+count is not sortable on the API
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42591 Bug ID: 42591 Summary: current_item_level_holds+count is not sortable on the API Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: REST API Assignee: koha-bugs@lists.koha-community.org Reporter: tomascohen@gmail.com QA Contact: testopia@bugs.koha-community.org CC: tomascohen@gmail.com Depends on: 41950 The current_item_level_holds+count embed on the acquisitions orders endpoint cannot be sorted because the underlying query is too complex for a single DBIC relationship. Koha::Acquisition::Order->current_item_level_holds requires: 1. Getting item numbers from aqorders_items for the order 2. Getting the biblio for the order 3. Querying holds on that biblio filtered by reservedate <= NOW() + ConfirmFutureHolds AND itemnumber IN (those items) This involves a syspref-dependent date calculation and a multi-table correlation that cannot be expressed as a DBIC relationship coderef. A possible approach would be a raw SQL subquery override mechanism in _build_count_subquery, or accepting that this embed remains display-only (not sortable). Test plan: prove t/db_dependent/api/v1/acquisitions_orders.t Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41950 [Bug 41950] Make +count embeds sortable by using SQL-level COUNT subqueries -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42591 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |42587 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42587 [Bug 42587] overdues+count is not sortable on the API -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42591 Bug 42591 depends on bug 41950, which changed state. Bug 41950 Summary: Make +count embeds sortable by using SQL-level COUNT subqueries https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41950 What |Removed |Added ---------------------------------------------------------------------------- Status|Needs documenting |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org