Summary: | Limits are not correctly parsed when query contains CCL | ||
---|---|---|---|
Product: | Koha | Reporter: | Nick Clemens (kidclamp) <nick> |
Component: | Searching - Zebra | Assignee: | Nick Clemens (kidclamp) <nick> |
Status: | CLOSED FIXED | QA Contact: | Joonas Kylmälä <joonas.kylmala> |
Severity: | normal | ||
Priority: | P5 - low | CC: | joonas.kylmala, lucas, magnus, martin.renvoize, victor |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: |
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17170 https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5274 |
||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
22.11.00, 22.05.01
|
|
Circulation function: | |||
Attachments: |
Bug 30528: Unit tests
Bug 30528: Process limits before handling CCL query Bug 30528: Unit tests Bug 30528: Process limits before handling CCL query Bug 30528: Unit tests Bug 30528: Process limits before handling CCL query |
Description
Nick Clemens (kidclamp)
2022-04-13 14:53:19 UTC
Created attachment 133306 [details] [review] Bug 30528: Unit tests Created attachment 133307 [details] [review] Bug 30528: Process limits before handling CCL query This patch moves the code that handles limit processing before that for CCL queries to ensure that special limit cases (branch, multibranch, etc) are handled before adding the limits to the query string To test: 1 - Apply unit tests patch only 2 - prove -v t/db_dependent/Search.t 3 - It fails 4 - Apply this patch 5 - It passes! 6 - Test searching and confirm things work as epxected *** Bug 30527 has been marked as a duplicate of this bug. *** I'm seeing this on 21.11.04, when looking at a detail view in the intranet: ==> /var/log/koha/hig/plack-error.log <== CCL parsing error (10014) Unknown qualifier ZOOM for query: Host-item=(Psychology and law =) at /usr/share/koha/lib/C4/Search.pm line 242. Warning from simple_search_compat: 'CCL parsing error (10014) Unknown qualifier ZOOM' at /usr/share/koha/lib/Koha/Biblio.pm line 540. In the staff client, this message is displayed above the title of the record: "There was an error searching for analytic records, please see the logs for details." Not sure if this is related. (In reply to Magnus Enger from comment #4) > I'm seeing this on 21.11.04, when looking at a detail view in the intranet: > > ==> /var/log/koha/hig/plack-error.log <== > CCL parsing error (10014) Unknown qualifier ZOOM for query: > Host-item=(Psychology and law =) at /usr/share/koha/lib/C4/Search.pm line > 242. > Warning from simple_search_compat: 'CCL parsing error (10014) Unknown > qualifier ZOOM' at /usr/share/koha/lib/Koha/Biblio.pm line 540. > > In the staff client, this message is displayed above the title of the record: > > "There was an error searching for analytic records, please see the logs for > details." > > Not sure if this is related. This is related, but a different bug, see the ones below: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29418 https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27575 Created attachment 134867 [details] [review] Bug 30528: Unit tests Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Created attachment 134868 [details] [review] Bug 30528: Process limits before handling CCL query This patch moves the code that handles limit processing before that for CCL queries to ensure that special limit cases (branch, multibranch, etc) are handled before adding the limits to the query string To test: 1 - Apply unit tests patch only 2 - prove -v t/db_dependent/Search.t 3 - It fails 4 - Apply this patch 5 - It passes! 6 - Test searching and confirm things work as epxected Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> OK, took me a while to wrap my head around, but I agree with this change now.. and yes, we should chase the clean_query stuff in the other bugs. Signing off Created attachment 135361 [details] [review] Bug 30528: Unit tests Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> Created attachment 135362 [details] [review] Bug 30528: Process limits before handling CCL query This patch moves the code that handles limit processing before that for CCL queries to ensure that special limit cases (branch, multibranch, etc) are handled before adding the limits to the query string To test: 1 - Apply unit tests patch only 2 - prove -v t/db_dependent/Search.t 3 - It fails 4 - Apply this patch 5 - It passes! 6 - Test searching and confirm things work as epxected Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> Pushed to master for 22.11. Nice work everyone, thanks! Pushed to 22.05.x for 22.05.01 Not backported to oldoldstable (21.05.x). Feel free to ask if it's needed. |