[Bug 29048] New: Authorities search results - related records link
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29048 Bug ID: 29048 Summary: Authorities search results - related records link Change sponsored?: --- Product: Koha Version: 21.05 Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: OPAC Assignee: oleonard@myacpl.org Reporter: vitorfernandes87@gmail.com QA Contact: testopia@bugs.koha-community.org The related records link in the authorities search results searches for "an=authid", which returns all records with an started with authid (after clicking the link). This causes a difference between the number of related records and the number of records retrieved in the search (using Elasticsearch). The link should change from: q=an=[% resul.authid | uri %] To: q=[% resul.authid | uri %]&idx=an,phr in the following line: https://github.com/Koha-Community/Koha/blob/master/koha-tmpl/opac-tmpl/boots... Test plan: - Create 10 authority with similar values - Relate some record with authority 1 - Relate some record with authority 10 - Search authorities (authority 1 should have 1 related record) - Click the related records link - You should get 2 related records -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29048 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|21.05 |master Severity|minor |normal --- Comment #1 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- It looks like this is only an issue with Elasticsearch - Zebra seems to be have fine. I guess there is some automatic truncation going on here? You can test this easily with: an:3 and an,phr:3 in ktd and notice the difference in result lists. The authority detail page already uses the ,phr, so making them consistent seems like a good idea for a quick fix, but maybe we want to dig a little deeper to fully understand the difference in behavior here? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29048 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29048 --- Comment #2 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 131154 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=131154&action=edit Bug 29048: Fix link to linked records from authority search results in OPAC Without this patch the constructed search link would give wrong results with Elasticsearch. If you searched for records linked to authority id 3 it would also turn up all other records linked to an authority where the id started with 3... This just copies the more specific link using an,phr used in the staff interface and the OPAC detail page to make things consistent To test: - Turn on Elasticsearch - Search for authorities in the OPAC - Locate a authority with a low ID in your result list - Note the number of linked records - Click on the link - It will give you more results than it said before - Verify results don't match your search - Apply patch - Try again - now it should all match up -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29048 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|oleonard@myacpl.org |koha-bugs@lists.koha-commun | |ity.org QA Contact|testopia@bugs.koha-communit | |y.org | Component|OPAC |Searching - Elasticsearch Summary|Authorities search results |Incorrect search for linked |- related records link |authority records from | |authority search result | |list in OPAC -- 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=29048 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |30740 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30740 [Bug 30740] Link to authorities 'used in' should not use equal -- 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=29048 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #131154|0 |1 is obsolete| | --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 134946 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=134946&action=edit Bug 29048: Fix link to linked records from authority search results in OPAC Without this patch the constructed search link would give wrong results with Elasticsearch. If you searched for records linked to authority id 3 it would also turn up all other records linked to an authority where the id started with 3... This just copies the more specific link using an,phr used in the staff interface and the OPAC detail page to make things consistent To test: - Turn on Elasticsearch - Search for authorities in the OPAC - Locate a authority with a low ID in your result list - Note the number of linked records - Click on the link - It will give you more results than it said before - Verify results don't match your search - Apply patch - Try again - now it should all match up -- 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=29048 --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Rebased on top of bug 30740 -- 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=29048 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=26608 -- 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=29048 --- Comment #5 from Fridolin Somers <fridolin.somers@biblibre.com> --- We should always use "an:XXX" but with bug 24143 This is the behavior of Zebra. And this syntax is used in facets for example. -- 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=29048 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=24143 -- 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=29048 --- Comment #6 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Sorry, Frido, I forgot to save the change I had made (it was my intention to fix exactly that in the rebase). -- 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=29048 --- Comment #7 from Fridolin Somers <fridolin.somers@biblibre.com> --- (In reply to Fridolin Somers from comment #5)
We should always use "an:XXX" but with bug 24143 I mean Bug 26608
-- 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=29048 --- Comment #8 from Fridolin Somers <fridolin.somers@biblibre.com> --- (In reply to Katrin Fischer from comment #6)
Sorry, Frido, I forgot to save the change I had made (it was my intention to fix exactly that in the rebase).
Ah if adding phr works cool. We also need to change in staff interface then. Arf and XSLT is full of 'q=an:XXXX' -- 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=29048 --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I just made them 'the same', so fixing the inconsistency here. But I believe it's just a trick maybe to 'deactivate' QueryAutoTruncate? See: bug 30641 -- 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=29048 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |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=29048 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |katrin.fischer@bsz-bw.de |ity.org | -- 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=29048 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=29048 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #134946|0 |1 is obsolete| | --- Comment #10 from David Nind <david@davidnind.com> --- Created attachment 140642 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140642&action=edit Bug 29048: Fix link to linked records from authority search results in OPAC Without this patch the constructed search link would give wrong results with Elasticsearch. If you searched for records linked to authority id 3 it would also turn up all other records linked to an authority where the id started with 3... This just copies the more specific link using an,phr used in the staff interface and the OPAC detail page to make things consistent To test: - Turn on Elasticsearch - Search for authorities in the OPAC - Locate a authority with a low ID in your result list - Note the number of linked records - Click on the link - It will give you more results than it said before - Verify results don't match your search - Apply patch - Try again - now it should all match up 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=29048 --- Comment #11 from David Nind <david@davidnind.com> --- I've tested and signed off (using KTD and the sample data). This on the assumption that it fixes the actual URL link in the records column (X record) on the OPAC authority search results listing page by changing it from &q=an:3 to &q=an,phr:3. Apologies if I have misunderstood what this is fixing! Testing notes ------------- 1. Both before and after patch: searching for Ritchie (authid=3) shows "1 record" in the records column in the authority search results listing page. 2. Link for '1 record' in the records column in the authority search results page BEFORE the patch is applied: http://127.0.0.1:8080/cgi-bin/koha/opac-search.pl?type=opac&op=do_search&q=an:3 3. Link for '1 record' in the records column in the authority search results page AFTER the patch is applied: http://127.0.0.1:8080/cgi-bin/koha/opac-search.pl?type=opac&op=do_search&q=an,phr:3 4. Both before and after the patch is applied: in the details page for the authority record it shows "Number of records used in: 44" 5. Both before and after the patch is applied: if I click the link in the authority search results listing page, I get 44 search results. 6. For all the above (1-5) QueryAutoTruncate was set to "automatically". 7. If QueryAutoTruncate is set to "only if * is added.", then the number of results displays as expected: 1. (I also linked the authority to another record, and this displayed as expected with 2 records.) 8. Bugs that will fix other issues: . Bug 26608 - Authorities: linked biblios is inconsistent using elasticsearch and QueryAutoTruncate . Bug 30641 - Authority detail page shows wrong number of records using the authority -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29048 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #140642|0 |1 is obsolete| | --- Comment #12 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 141486 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=141486&action=edit Bug 29048: Fix link to linked records from authority search results in OPAC Without this patch the constructed search link would give wrong results with Elasticsearch. If you searched for records linked to authority id 3 it would also turn up all other records linked to an authority where the id started with 3... This just copies the more specific link using an,phr used in the staff interface and the OPAC detail page to make things consistent To test: - Turn on Elasticsearch - Search for authorities in the OPAC - Locate a authority with a low ID in your result list - Note the number of linked records - Click on the link - It will give you more results than it said before - Verify results don't match your search - Apply patch - Try again - now it should all match up Signed-off-by: David Nind <david@davidnind.com> 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=29048 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact| |martin.renvoize@ptfs-europe | |.com CC| |martin.renvoize@ptfs-europe | |.com Status|Signed Off |Passed QA --- Comment #13 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Nice consistency improvement, trivial fix. Passing QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29048 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=29048 --- Comment #14 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=29048 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable CC| |lucas@bywatersolutions.com Version(s)|22.11.00 |22.11.00, 22.05.08 released in| | --- Comment #15 from Lucas Gass <lucas@bywatersolutions.com> --- Backported to 22.05.x for upcoming 22.05.08 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29048 Bernard <bernard.scaife@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bernard.scaife@ptfs-europe. | |com --- Comment #16 from Bernard <bernard.scaife@ptfs-europe.com> --- I have found this problem also affects the equivalent intranet search. I was able to fix it by changing line 61 of /usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en-GB/modules/authorities/details.tt and add the ,phr <a href="/cgi-bin/koha/catalogue/search.pl?type=intranet&op=do_search&q=an,phr=[% authid | uri %]">[% count | html %] record(s)</a> Does this need adding to this patch? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29048 --- Comment #17 from Bernard <bernard.scaife@ptfs-europe.com> --- CORRECTION: My patch was wrong. Instead, we surround the authority number with " to force phrase search: Used in <a href="/cgi-bin/koha/catalogue/search.pl?type=intranet&op=do_search&q=an="[% authid | uri %]"">[% count | html %] record(s)</a> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29048 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |arthur.suzuki@biblibre.com Status|Pushed to stable |RESOLVED Resolution|--- |FIXED --- Comment #18 from Arthur Suzuki <arthur.suzuki@biblibre.com> --- depends on 30740, not present in 21.11. Won't backport. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org