[Bug 31543] New: MaxComponentRecords link is broken
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31543 Bug ID: 31543 Summary: MaxComponentRecords link is broken Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Searching Assignee: koha-bugs@lists.koha-community.org Reporter: caroline.cyr-la-rose@inlibro.com QA Contact: testopia@bugs.koha-community.org I was trying out the Component records feature and noticed the link when you have more component records than MaxComponentRecords is broken. I'm using Elasticsearch, if that changes anything. 1)Import the example file 1.1) Go to Tools > Stage MARC records for import 1.2) Upload the example file 1.3) In the form, choose the format 'MARCXML' 1.4) Click 'Stage for import' 1.5) Click 'Manage staged records' 1.6) Click 'Import this batch into the catalog' 2) Change MaxComponentRecords to 10 3) In the staff interface, search the catalog for 'easy piano' 4) Click on the record 'Easy piano pieces for children' 5) Click on the 'show all component parts' link at the bottom of the Components tab --> it searches for HASH(...) - returns no results 6) Try the same in OPAC --> it searches for HASH(...) - returns no results -- 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=31543 --- Comment #1 from Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> --- Created attachment 140384 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140384&action=edit Example marc file I stole the example marc file from bug 11175 -- 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=31543 Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |11175 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11175 [Bug 11175] Show the parent record's component parts in the detailed views -- 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=31543 --- Comment #2 from Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> --- Oops, I forgot to say that you have to enable the ShowComponentRecords syspref too. 1)Import the example file 1.1) Go to Tools > Stage MARC records for import 1.2) Upload the example file 1.3) In the form, choose the format 'MARCXML' 1.4) Click 'Stage for import' 1.5) Click 'Manage staged records' 1.6) Click 'Import this batch into the catalog' 2) Change ShowComponentRecords to 'both staff interface and OPAC' 3) Change MaxComponentRecords to 10 4) In the staff interface, search the catalog for 'easy piano' 5) Click on the record 'Easy piano pieces for children' 6) Click on the 'show all component parts' link at the bottom of the Components tab --> it searches for HASH(...) - returns no results 7) Try the same in OPAC --> it searches for HASH(...) - returns no results -- 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=31543 Nick Clemens <nick@bywatersolutions.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=31543 --- Comment #3 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 142665 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=142665&action=edit Bug 31543: Use query string, rather than query, to build link This patch returns the query string from build_query_compat Under Zebra, either works for the link, for ES we need the simple string I expand the test for get_components_query to test both engines To test: 1.0) Set search engine to Elasticsearch 1.1) Go to Tools > Stage MARC records for import 1.2) Upload the example file 1.3) In the form, choose the format 'MARCXML' 1.4) Click 'Stage for import' 1.5) Click 'Manage staged records' 1.6) Click 'Import this batch into the catalog' 2) Change MaxComponentRecords to 10 3) In the staff interface, search the catalog for 'easy piano' 4) Click on the record 'Easy piano pieces for children' 5) Click on the 'show all component parts' link at the bottom of the Components tab --> it searches for HASH(...) - returns no results 6) Try the same in OPAC --> it searches for HASH(...) - returns no results 7) Apply patch and restart all 8) repeat 3-6 9) Results returned! -- 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=31543 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@bywatersolutions.com 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=31543 Claes <claes.eriksson@vti.se> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |claes.eriksson@vti.se -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31543 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA CC| |david@davidnind.com --- Comment #4 from David Nind <david@davidnind.com> --- This works on the staff interface, but I get no results for the OPAC. This is related to the query in the URL I think. OPAC: - Query in URL generated on the OPAC: /cgi-bin/koha/opac-search.pl?q=Host-item%3A("Easy piano pieces for children \%2F")%26sort_by%3Dtitle_asc - Search box: Host-item:("Easy piano pieces for children \/")&sort_by=title_asc - Note - the staff interface has this in the search box: Host-item:("Easy piano pieces for children \/") If I change the query in the OPAC URL to the match that used in the staff interface, it works: - Change OPAC URL to: /cgi-bin/koha/opac-search.pl?q=Host-item:("Easy piano pieces for children \/")&sort_by=title_asc - OPAC search box: Host-item:("Easy piano pieces for children \/") -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31543 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31543 --- Comment #5 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 143948 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=143948&action=edit Bug 31543: (follow-up) Use url filter for opac components search The previous patch switches to using 'query_string' which is returned encoded. Using uri we doulbe encode the string - this patch prevents that -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31543 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31543 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #142665|0 |1 is obsolete| | --- Comment #6 from David Nind <david@davidnind.com> --- Created attachment 143963 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=143963&action=edit Bug 31543: Use query string, rather than query, to build link This patch returns the query string from build_query_compat Under Zebra, either works for the link, for ES we need the simple string I expand the test for get_components_query to test both engines To test: 1.0) Set search engine to Elasticsearch 1.1) Go to Tools > Stage MARC records for import 1.2) Upload the example file 1.3) In the form, choose the format 'MARCXML' 1.4) Click 'Stage for import' 1.5) Click 'Manage staged records' 1.6) Click 'Import this batch into the catalog' 2) Change MaxComponentRecords to 10 3) In the staff interface, search the catalog for 'easy piano' 4) Click on the record 'Easy piano pieces for children' 5) Click on the 'show all component parts' link at the bottom of the Components tab --> it searches for HASH(...) - returns no results 6) Try the same in OPAC --> it searches for HASH(...) - returns no results 7) Apply patch and restart all 8) repeat 3-6 9) Results returned! Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31543 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #143948|0 |1 is obsolete| | --- Comment #7 from David Nind <david@davidnind.com> --- Created attachment 143964 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=143964&action=edit Bug 31543: (follow-up) Use url filter for opac components search The previous patch switches to using 'query_string' which is returned encoded. Using uri we doulbe encode the string - this patch prevents that Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31543 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |normal -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31543 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA 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=31543 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #143963|0 |1 is obsolete| | --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 143965 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=143965&action=edit Bug 31543: Use query string, rather than query, to build link This patch returns the query string from build_query_compat Under Zebra, either works for the link, for ES we need the simple string I expand the test for get_components_query to test both engines To test: 1.0) Set search engine to Elasticsearch 1.1) Go to Tools > Stage MARC records for import 1.2) Upload the example file 1.3) In the form, choose the format 'MARCXML' 1.4) Click 'Stage for import' 1.5) Click 'Manage staged records' 1.6) Click 'Import this batch into the catalog' 2) Change MaxComponentRecords to 10 3) In the staff interface, search the catalog for 'easy piano' 4) Click on the record 'Easy piano pieces for children' 5) Click on the 'show all component parts' link at the bottom of the Components tab --> it searches for HASH(...) - returns no results 6) Try the same in OPAC --> it searches for HASH(...) - returns no results 7) Apply patch and restart all 8) repeat 3-6 9) Results returned! Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31543 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #143964|0 |1 is obsolete| | --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 143966 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=143966&action=edit Bug 31543: (follow-up) Use url filter for opac components search The previous patch switches to using 'query_string' which is returned encoded. Using uri we doulbe encode the string - this patch prevents that Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31543 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master CC| |tomascohen@gmail.com Version(s)| |22.11 released in| | --- Comment #10 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.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org