[Bug 35963] New: Problem using some filters in the bundled items table
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35963 Bug ID: 35963 Summary: Problem using some filters in the bundled items table Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Cataloging Assignee: koha-bugs@lists.koha-community.org Reporter: julian.maurice@biblibre.com QA Contact: testopia@bugs.koha-community.org CC: m.de.rooy@rijksmuseum.nl Depends on: 28854 When trying to use the barcode filter of the bundled items table, the REST API returns an error 500 with the following message in logs: Unknown column 'me.barcode' in 'where clause' at /usr/share/perl5/Data/Page.pm line 49 The URL looks like this: /api/v1/items/3/bundled_items?&_page=1&_per_page=20&q=[{"me.external_id":{"like":"%1%"}}]&_match=contains If I manually remove "me." from the URL, it works. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28854 [Bug 28854] Add ability to create bundles of items for circulation -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35963 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35963 --- Comment #1 from Julian Maurice <julian.maurice@biblibre.com> --- Created attachment 161812 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=161812&action=edit 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... 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` -- 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=35963 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35963 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |julian.maurice@biblibre.com |ity.org | -- 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=35963 --- Comment #2 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Created attachment 162521 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=162521&action=edit Bug 35963: Add tests Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35963 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #161812|0 |1 is obsolete| | --- Comment #3 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Created attachment 162522 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=162522&action=edit 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... 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> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35963 --- Comment #4 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Created attachment 162523 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=162523&action=edit Bug 35963: (QA follow-up): tidy up code and fix exec permission -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35963 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |victor@tuxayo.net Status|Needs Signoff |Signed Off --- Comment #5 from Victor Grousset/tuxayo <victor@tuxayo.net> --- It works :) Also split commit to check that the new tests indeed need the implementation to pass. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35963 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #162521|0 |1 is obsolete| | --- Comment #6 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 162718 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=162718&action=edit Bug 35963: Add tests Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35963 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #162522|0 |1 is obsolete| | --- Comment #7 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 162719 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=162719&action=edit 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... 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> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35963 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #162523|0 |1 is obsolete| | --- Comment #8 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 162720 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=162720&action=edit Bug 35963: (QA follow-up): tidy up code and fix exec permission Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35963 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA QA Contact|testopia@bugs.koha-communit |martin.renvoize@ptfs-europe |y.org |.com --- Comment #9 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Thanks chaps, Passing QA here. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35963 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |24.05.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35963 --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 24.05! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35963 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m Version(s)|24.05.00 |24.05.00,23.11.04 released in| | Status|Pushed to master |Pushed to stable --- Comment #11 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 23.11.x for 23.11.04 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35963 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|24.05.00,23.11.04 |24.05.00,23.11.04,23.05.10 released in| | Status|Pushed to stable |Pushed to oldstable CC| |lucas@bywatersolutions.com --- Comment #12 from Lucas Gass <lucas@bywatersolutions.com> --- Backported to 23.05.x for upcoming 23.05.10. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35963 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC|martin.renvoize@ptfs-europe | |.com | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35963 Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |wainuiwitikapark@catalyst.n | |et.nz Resolution|--- |FIXED Status|Pushed to oldstable |RESOLVED --- Comment #13 from Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> --- Not backporting to 22.11 unless requested -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org