https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42590

            Bug ID: 42590
           Summary: bundle_items_not_lost+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: [email protected]
          Reporter: [email protected]
        QA Contact: [email protected]
                CC: [email protected]
        Depends on: 41950

The bundle_items_not_lost+count embed on the biblio items endpoint cannot be
sorted because the bundle_items_not_lost DBIC relationship does not exist on
the Item result class.

Same approach as bundle_items_lost+count (bug 42589) but filtering on itemlost
= 0.

The generated subquery would be:
(SELECT COUNT(*) FROM items WHERE items.itemnumber IN (SELECT item FROM
item_bundles WHERE host = me.itemnumber) AND items.itemlost = 0)

Performance note: Same correlated IN subquery concern as
bundle_items_lost+count. The trade-off should be evaluated.

Test plan:
prove t/Koha/REST/Plugin/Query.t t/db_dependent/api/v1/biblios.t
t/db_dependent/Koha/Item.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 the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to