The general search query is not built correctly. Say you have a table with column filters, like the main patron search: General filter: henry Specific filter on the 'Name' column: h The generated query will be (= are actually LIKE): { Column1="henry" AND Column3="henry", ...} AND { Column2="h" } The first term does not contain the Column2 attribute.
Created attachment 134016 [details] [review] Bug 30626: DT REST API wrapper - Fix general search The general search query is not built correctly. Say you have a table with column filters, like the main patron search: General filter: henry Specific filter on the 'Name' column: h The generated query will be (= are actually LIKE): { Column1="henry" AND Column3="henry", ...} AND { Column2="h" } The first term does not contain the Column2 attribute.
Created attachment 134017 [details] [review] Bug 30626: Fix test
We will certainly want to backport this fix. Skip the changes to the selenium tests if it does not apply.
Created attachment 134055 [details] [review] Bug 30626: DT REST API wrapper - Fix general search The general search query is not built correctly. Say you have a table with column filters, like the main patron search: General filter: henry Specific filter on the 'Name' column: h The generated query will be (= are actually LIKE): { Column1="henry" AND Column3="henry", ...} AND { Column2="h" } The first term does not contain the Column2 attribute. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 134056 [details] [review] Bug 30626: Fix test Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 134057 [details] [review] Bug 30626: (QA follow-up) Fix test plan
All works well for me in testing (I tried both with the unit test and manually testing with relevant data). I can't entirely remember/work out why we had that line in there in the first place the way we did though.. :(. Signing off
(In reply to Martin Renvoize from comment #6) > Created attachment 134057 [details] [review] [review] > Bug 30626: (QA follow-up) Fix test plan We won't need that on top of bug 30576.
Could you provide a test plan for this one?
(In reply to Katrin Fischer from comment #9) > Could you provide a test plan for this one? Go to /cgi-bin/koha/members/members-home.pl Click search without providing any terms Search "henry" in the global DT search and "h" in the "Name" column filter
Created attachment 134214 [details] [review] Bug 30626: DT REST API wrapper - Fix general search The general search query is not built correctly. Say you have a table with column filters, like the main patron search: General filter: henry Specific filter on the 'Name' column: h The generated query will be (= are actually LIKE): { Column1="henry" AND Column3="henry", ...} AND { Column2="h" } The first term does not contain the Column2 attribute. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 134215 [details] [review] Bug 30626: Fix test Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 134216 [details] [review] Bug 30626: (QA follow-up) Fix test plan Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Now Nick beat me to it :) Nick++
Created attachment 134252 [details] [review] Bug 30626: Don't generate the query if no term passed
*** Bug 30643 has been marked as a duplicate of this bug. ***
Pushed to master for 22.05, thanks to everybody involved [U+1F984]
Does not apply to 21.11.x, please rebase if needed.