Summary: | Column filters on the item search do not work | ||
---|---|---|---|
Product: | Koha | Reporter: | Jonathan Druart <jonathan.druart> |
Component: | Staff interface | Assignee: | Jonathan Druart <jonathan.druart> |
Status: | Pushed to stable --- | QA Contact: | Brendan Lawlor <blawlor> |
Severity: | normal | ||
Priority: | P5 - low | CC: | blawlor, gmcharlt, lucas |
Version: | unspecified | Keywords: | additional_work_needed |
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40122 | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | Trivial patch | Documentation contact: | |
Documentation submission: | Text to go in the release notes: |
This patch fixes a problem that made the column search filters not to work when doing an item search.
|
|
Version(s) released in: |
25.11.00,25.05.04
|
Circulation function: | |
Bug Depends on: | 40876 | ||
Bug Blocks: | 38311 | ||
Attachments: |
Bug 40565: Fix column filters on item search
Bug 40565: Fix column filters on item search Bug 40565: Fix column filters on item search Bug 40565: (follow-up) Make sure there is a table_node Revert "Bug 40565: (follow-up) Make sure there is a table_node" Bug 40565: Correctly fix the retrieval of 'id' |
Description
Jonathan Druart
2025-07-31 12:55:26 UTC
Created attachment 184924 [details] [review] Bug 40565: Fix column filters on item search The item search table is different from the other tables. It is using server-side but its own way (not using the REST API). Test plan: Search items and filter using the column filters: collections, library, item types, AVs, etc. QA: I am not very happy with this patch but, feel free to suggest a better fix! Note that "results" was too generic and it felt better to adjust it. Created attachment 184973 [details] [review] Bug 40565: Fix column filters on item search The item search table is different from the other tables. It is using server-side but its own way (not using the REST API). Test plan: Search items and filter using the column filters: collections, library, item types, AVs, etc. QA: I am not very happy with this patch but, feel free to suggest a better fix! Note that "results" was too generic and it felt better to adjust it. Signed-off-by: David Nind <david@davidnind.com> Created attachment 186744 [details] [review] Bug 40565: Fix column filters on item search The item search table is different from the other tables. It is using server-side but its own way (not using the REST API). Test plan: Search items and filter using the column filters: collections, library, item types, AVs, etc. QA: I am not very happy with this patch but, feel free to suggest a better fix! Note that "results" was too generic and it felt better to adjust it. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org> This works as described. Since item search doesn't use the API and has its own way of handling parameters it makes sense that the values of the options in the table header dropdowns need to be the plain codes instead of a regex for starting and ending with the code. Changing the id of the table to item_search to be more specific makes this change to datatables.js more clear. I like how simple this solution is, and couldn't come up with any alternative. Passing QA. Nice work everyone! Pushed to main for 25.11 This is causing a problem with the datatable on http://localhost:8081/cgi-bin/koha/acquisition/vendors: Uncaught (in promise) TypeError: table_node.attr is not a function I think it's maybe responsible for the failures I see here also: https://jenkins.koha-community.org/job/Koha_Main/lastCompletedBuild/testReport/ Created attachment 186903 [details] [review] Bug 40565: (follow-up) Make sure there is a table_node I am working a follow-ups. Created attachment 186911 [details] [review] Revert "Bug 40565: (follow-up) Make sure there is a table_node" This reverts commit addd5e3a0d32e227834c02c2b16ac735decb80fa. Created attachment 186912 [details] [review] Bug 40565: Correctly fix the retrieval of 'id' For other tables than those from Vue apps, table_node is the node and we need to retrieve the object before accessing the attr function Found a separate bug that was linked to the last failure. It needs to be pushed before the last 2 patches. Lucas: please push the patch from bug 40876 then: Revert "Bug 40565: (follow-up) Make sure there is a table_node" Bug 40565: Correctly fix the retrieval of 'id' After this you should run prove t/db_dependent/selenium/patrons_search.t cypress run --spec t/cypress/integration/ERM/Licenses_spec.ts cypress run --spec t/cypress/integration/KohaTable/PatronSearch_spec.ts They must all pass Follow-ups here pushed to main. (In reply to Jonathan Druart from comment #11) > Found a separate bug that was linked to the last failure. > > It needs to be pushed before the last 2 patches. > > Lucas: please push the patch from bug 40876 then: > Revert "Bug 40565: (follow-up) Make sure there is a table_node" > Bug 40565: Correctly fix the retrieval of 'id' I have pushed in this order. Nice work everyone! Pushed to 25.05.x |