[Bug 30528] New: Limits are not correctly parsed when query contains CCL
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30528 Bug ID: 30528 Summary: Limits are not correctly parsed when query contains CCL Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Searching - Zebra Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com This was made more apparent by bug 17170 - when a special limit that needs parsing is passed along witha query containing CCL indexes then the limits are not parsed (with exception of 'available' which is handled) This is due to a clause the prevents the normal parsing in C4::Search::buildQuery To test: 1 - Perform advanced search in staff client 2 - Select 'More options' 3 - In first box with keyword as index type 'ti:a' 4 - Enter a year into Limits 5 - Search 6 - You see only 'ti:a' in description, and search fails with bug 17170 1 - Save a search filter visible in staff client 2 - Perform a search like 'ti:a' 3 - Attempt to filter using custom filter 4 - In plack intranet error log: [2022/04/13 14:14:51] [WARN] WARNING: query problem with ti=a and search_filter=94 ZOOM error 10014 "CCL parsing error" (addinfo: "Unknown qualifier") from diag-set 'ZOOM' at /kohadevbox/koha/C4/Search.pm line 352. -- 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=30528 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=17170, | |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=5274 -- 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=30528 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- 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=30528 --- Comment #1 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 133306 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=133306&action=edit Bug 30528: Unit tests -- 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=30528 --- Comment #2 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 133307 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=133307&action=edit 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 -- 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=30528 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |nick@bywatersolutions.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=30528 --- Comment #3 from Magnus Enger <magnus@libriotech.no> --- *** Bug 30527 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30528 Magnus Enger <magnus@libriotech.no> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |magnus@libriotech.no --- Comment #4 from Magnus Enger <magnus@libriotech.no> --- 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. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30528 --- Comment #5 from Nick Clemens <nick@bywatersolutions.com> --- (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 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30528 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #133306|0 |1 is obsolete| | --- Comment #6 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 134867 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=134867&action=edit Bug 30528: Unit tests 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=30528 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #133307|0 |1 is obsolete| | --- Comment #7 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 134868 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=134868&action=edit 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> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30528 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off 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=30528 --- Comment #8 from 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 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30528 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30528 Joonas Kylmälä <joonas.kylmala@iki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30528 Joonas Kylmälä <joonas.kylmala@iki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #134867|0 |1 is obsolete| | Attachment #134868|0 |1 is obsolete| | --- Comment #9 from Joonas Kylmälä <joonas.kylmala@iki.fi> --- Created attachment 135361 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135361&action=edit Bug 30528: Unit tests Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30528 --- Comment #10 from Joonas Kylmälä <joonas.kylmala@iki.fi> --- Created attachment 135362 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135362&action=edit 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> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30528 Joonas Kylmälä <joonas.kylmala@iki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact| |joonas.kylmala@iki.fi CC| |joonas.kylmala@iki.fi -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30528 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |22.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30528 --- Comment #11 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 22.11. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30528 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com Version(s)|22.11.00 |22.11.00, 22.05.01 released in| | --- Comment #12 from Lucas Gass <lucas@bywatersolutions.com> --- Pushed to 22.05.x for 22.05.01 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30528 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Needs documenting CC| |victor@tuxayo.net --- Comment #13 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Not backported to oldoldstable (21.05.x). Feel free to ask if it's needed. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30528 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs documenting |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org