]> git.koha-community.org Git - koha.git/commit
Bug 35963: Fix bundled items table ordering and filtering
authorJulian Maurice <julian.maurice@biblibre.com>
Wed, 7 Feb 2024 13:36:01 +0000 (14:36 +0100)
committerKatrin Fischer <katrin.fischer@bsz-bw.de>
Thu, 7 Mar 2024 14:02:51 +0000 (15:02 +0100)
commit2753eec1ce8ce57afc10162936967d1f39c2b0b8
tree4d589fc94b70982a1a93e549d628e5baba7e1a9c
parent9344f4317083e9d70c3ff9e923447e80282ef01c
Bug 35963: Fix bundled items table ordering and filtering

Using the many-to-many relationship results in the table alias `me` to
be used for table `item_bundles` instead of the expected table `items`.
This causes ordering and filtering to fail for columns Callnumber and
Barcode.
Using Koha::Items->search does not have this problem.

This patch also disables ordering by status because it does not work
(error message is: "Cannot find Koha::Object class for return_claim'")

Test plan:
1. Create an item bundle
   https://koha-community.org/manual/23.11/en/html/circulation.html#circulating-bundles
2. Add at least 2 items to this bundle
3. Verify that ordering/filtering by callnumber or barcode works
4. Run `prove t/db_dependent/api/v1/items/bundled_items.t`

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Koha/REST/V1/Items.pm
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt