[Bug 20501] New: Unhighlight in search results when the search terms contain the same word twice removes the word
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20501 Bug ID: 20501 Summary: Unhighlight in search results when the search terms contain the same word twice removes the word Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Searching Assignee: koha-bugs@lists.koha-community.org Reporter: phil@chetcolibrary.org QA Contact: testopia@bugs.koha-community.org If you search in the staff client for the keyword apple, you can then unhighlight and hightlight again over and over without harm, but if you search for the keyword apple apple (or any other repeated word, the search that showed it to me was the word A in A giraffe and a half), when you click unhighlight the first instance of the repeated word is completely removed from each search result, and if you click highlight, and then click unhighlight again, the next instance will be removed each time you highlight/unhighlight. -- 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=20501 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|Searching |SIP2 Version|unspecified |master CC| |colin.campbell@ptfs-europe. | |com, | |katrin.fischer@bsz-bw.de, | |oleonard@myacpl.org Severity|enhancement |normal --- Comment #1 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Confirmed, also appears to be limited to staff, OPAC is ok. -- 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=20501 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|SIP2 |Staff Client CC| |gmcharlt@gmail.com -- 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=20501 --- Comment #2 from Owen Leonard <oleonard@myacpl.org> --- I cannot reproduce this problem in master. Can anyone confirm? If so please cite another 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=20501 --- Comment #3 from Phil Ringnalda <phil.ccpl@gmail.com> --- Still present in master. How about the example from bug 5844, which fixed the copy of jquery.highlight-3.js in koha-tmpl/opac-tmpl/ but not the copy in koha-tmpl/intranet-tmpl/, "mag ma m"? All that's actually needed is to patch the intranet-tmpl copy the same way. I don't quite see how an example can actually work, unless there's some standard set of bib records everyone has that I haven't yet run across documentation of, though. Before I realized why it only happens in the staff client, I was drafting a set of steps to reproduce that were going to start with "Create a bib record with the title A is for apple and another with the title A my name is Anna" since reproducing requires only that you have a search which in your database will return two or more records and will have matches in things which are displayed in the staff client search results list. "a a" is actually a pretty good example since as long as you have two (or more) records in your database which contain the letter "a" in any indexed field, you will have highlights that will show the letter being removed from the DOM in the words "Material" and "Format" and "Literary" in the line "Material type: Book Format: print Literary form: Not fiction" even if you don't have highlights in the author or title. Might still fail for a non-English install, but otherwise it seems like the most likely to work in any install with any bib records. -- 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=20501 --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I can reproduce this: I searched for "the the". Unhighlighting removes the first occurrence of the word in the result list. (intranet only)
From the sample data: The ideas behind the chess openings / Reuben Fine. Turns into: ideas behind the chess openings / Reuben Fine.
-- 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=20501 --- Comment #5 from Phil Ringnalda <phil@chetcolibrary.org> --- Created attachment 103210 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=103210&action=edit Bug 20501: Don't cut strings when unhighlighting in intranet search results When you click Unhighlight on the search results of a search in the staff client when the search terms contain the same word twice, like "ma ma", the highlighted words disappear, and don't reappear if you click Highlight. This patch makes the same change to the intranet copy of jquery.highlight-3.js that bug 5844 made to the OPAC copy. Test plan: 1) Without this patch, search in the intranet for ma ma and verify you have at least two matching records. 2) Notice that the Ma in Material type: Book is highlighted. 3) Click Unhighlight, and notice that it has become terial type: Book 4) Apply this patch, repeat the search with a shift+reload to reload the .js 5) Click Unhighlight, and verify that Material type: Book remains Material -- 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=20501 Phil Ringnalda <phil@chetcolibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |phil@chetcolibrary.org |ity.org | 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=20501 Phil Ringnalda <phil@chetcolibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20501 Bernardo Gonzalez Kriegel <bgkriegel@gmail.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=20501 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #103210|0 |1 is obsolete| | --- Comment #6 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- Created attachment 103319 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=103319&action=edit Bug 20501: Don't cut strings when unhighlighting in intranet search results When you click Unhighlight on the search results of a search in the staff client when the search terms contain the same word twice, like "ma ma", the highlighted words disappear, and don't reappear if you click Highlight. This patch makes the same change to the intranet copy of jquery.highlight-3.js that bug 5844 made to the OPAC copy. Test plan: 1) Without this patch, search in the intranet for ma ma and verify you have at least two matching records. 2) Notice that the Ma in Material type: Book is highlighted. 3) Click Unhighlight, and notice that it has become terial type: Book 4) Apply this patch, repeat the search with a shift+reload to reload the .js 5) Click Unhighlight, and verify that Material type: Book remains Material Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Work as described, no errors. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20501 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #103319|0 |1 is obsolete| | --- Comment #7 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 103387 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=103387&action=edit Bug 20501: Don't cut strings when unhighlighting in intranet search results When you click Unhighlight on the search results of a search in the staff client when the search terms contain the same word twice, like "ma ma", the highlighted words disappear, and don't reappear if you click Highlight. This patch makes the same change to the intranet copy of jquery.highlight-3.js that bug 5844 made to the OPAC copy. Test plan: 1) Without this patch, search in the intranet for ma ma and verify you have at least two matching records. 2) Notice that the Ma in Material type: Book is highlighted. 3) Click Unhighlight, and notice that it has become terial type: Book 4) Apply this patch, repeat the search with a shift+reload to reload the .js 5) Click Unhighlight, and verify that Material type: Book remains Material Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Work as described, no errors. Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20501 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |josef.moravec@gmail.com QA Contact|testopia@bugs.koha-communit |josef.moravec@gmail.com |y.org | 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=20501 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |20.05.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20501 --- Comment #8 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Nice work everyone! Pushed to master for 20.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20501 Joy Nelson <joy@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable Version(s)|20.05.00 |20.05.00, 19.11.06 released in| | CC| |joy@bywatersolutions.com --- Comment #9 from Joy Nelson <joy@bywatersolutions.com> --- Backported to 19.11.x for 19.11.06 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20501 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Pushed to oldstable Version(s)|20.05.00, 19.11.06 |20.05.00, 19.11.06, released in| |19.05.11 CC| |lucas@bywatersolutions.com --- Comment #10 from Lucas Gass <lucas@bywatersolutions.com> --- backported to 19.05.x for 19.05.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20501 Andreas Roussos <a.roussos@dataly.gr> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=29578 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org