Summary: | Problem using some filters in the bundled items table | ||
---|---|---|---|
Product: | Koha | Reporter: | Julian Maurice <julian.maurice> |
Component: | Cataloging | Assignee: | Julian Maurice <julian.maurice> |
Status: | Pushed to oldstable --- | QA Contact: | Martin Renvoize (ashimema) <martin.renvoize> |
Severity: | normal | ||
Priority: | P5 - low | CC: | fridolin.somers, lucas, m.de.rooy, victor |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
24.05.00,23.11.04,23.05.10
|
|
Circulation function: | |||
Bug Depends on: | 28854 | ||
Bug Blocks: | |||
Attachments: |
Bug 35963: Fix bundled items table ordering and filtering
Bug 35963: Add tests Bug 35963: Fix bundled items table ordering and filtering Bug 35963: (QA follow-up): tidy up code and fix exec permission Bug 35963: Add tests Bug 35963: Fix bundled items table ordering and filtering Bug 35963: (QA follow-up): tidy up code and fix exec permission |
Description
Julian Maurice
2024-01-31 15:43:11 UTC
Created attachment 161812 [details] [review] 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` Created attachment 162521 [details] [review] Bug 35963: Add tests Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Created attachment 162522 [details] [review] 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> Created attachment 162523 [details] [review] Bug 35963: (QA follow-up): tidy up code and fix exec permission It works :) Also split commit to check that the new tests indeed need the implementation to pass. Created attachment 162718 [details] [review] Bug 35963: Add tests Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Created attachment 162719 [details] [review] 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> Created attachment 162720 [details] [review] Bug 35963: (QA follow-up): tidy up code and fix exec permission Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Thanks chaps, Passing QA here. Pushed for 24.05! Well done everyone, thank you! Pushed to 23.11.x for 23.11.04 Backported to 23.05.x for upcoming 23.05.10. |