[Bug 19684] New: Colon char in MARC data breaks facets
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19684 Bug ID: 19684 Summary: Colon char in MARC data breaks facets Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: Searching Assignee: koha-bugs@lists.koha-community.org Reporter: fridolin.somers@biblibre.com QA Contact: testopia@bugs.koha-community.org When a MARC data used in some facet contains colon char ":", this facet is broken it leads to no result. This is because all colon are replaced by = which is a CCL syntax char -- 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=19684 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |fridolin.somers@biblibre.co |ity.org |m -- 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=19684 Fridolin SOMERS <fridolin.somers@biblibre.com> 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=19684 --- Comment #1 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Created attachment 69301 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=69301&action=edit Bug 19684: Only replace first colon char in facets link When a MARC data used in some facet contains colon char ":", this facet is broken it leads to no result. This is because all colon are replaced by = which is a CCL syntax char. This patch corrects by replacing only first occurence of colon char, that is the index not the data. Test plan : 1) Create a record with subject "Ainur: Yavanna" (650$a for MARC21 or 600$a for UNIMARC) 2) Index this record in Zebra 3) Perform a search that shows this subject in facets 4) Click on this facet link 5) You get the record as result -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19684 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de Keywords| |Academy -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19684 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #2 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- I am not sure I understand the changes, how can we know it will not introduce side-effects? Tests are missing. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19684 --- Comment #3 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- (In reply to Jonathan Druart from comment #2)
I am not sure I understand the changes, how can we know it will not introduce side-effects? Tests are missing.
The facets links are composed of an index and a value separated by ":", for example su:History. But real CCL syntax is index=value so ":" must be replaced by "=". But actual code replaces all ":" even in value. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19684 abernaud <anne-claire.bernaudin@univ-rennes1.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |anne-claire.bernaudin@univ- | |rennes1.fr --- Comment #4 from abernaud <anne-claire.bernaudin@univ-rennes1.fr> --- Test successful. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19684 sandboxes@biblibre.com <sandboxes@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sandboxes@biblibre.com --- Comment #5 from sandboxes@biblibre.com <sandboxes@biblibre.com> --- Patch tested with a sandbox, by Anne-Claire Bernaudin <anne-claire.bernaudin@univ-rennes1.fr> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19684 sandboxes@biblibre.com <sandboxes@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #69301|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19684 --- Comment #6 from sandboxes@biblibre.com <sandboxes@biblibre.com> --- Created attachment 72947 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=72947&action=edit Bug 19684: Only replace first colon char in facets link When a MARC data used in some facet contains colon char ":", this facet is broken it leads to no result. This is because all colon are replaced by = which is a CCL syntax char. This patch corrects by replacing only first occurence of colon char, that is the index not the data. Test plan : 1) Create a record with subject "Ainur: Yavanna" (650$a for MARC21 or 600$a for UNIMARC) 2) Index this record in Zebra 3) Perform a search that shows this subject in facets 4) Click on this facet link 5) You get the record as result Signed-off-by: Anne-Claire Bernaudin <anne-claire.bernaudin@univ-rennes1.fr> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19684 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@bywatersolutions.com Status|Signed Off |Failed QA --- Comment #7 from Nick Clemens <nick@bywatersolutions.com> --- Unit tests needed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19684 Ella <ellawipatene@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ellawipatene@gmail.com Assignee|fridolin.somers@biblibre.co |ellawipatene@gmail.com |m | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19684 Eden <eden.bacani@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|ellawipatene@gmail.com |eden.bacani@gmail.com CC| |eden.bacani@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19684 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |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=19684 --- Comment #8 from Fridolin Somers <fridolin.somers@biblibre.com> --- Still valid ? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19684 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=29418 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=19684 --- Comment #9 from Fridolin Somers <fridolin.somers@biblibre.com> --- Arf limit may contain serveral blocks. Maybe we should move this replacement in : foreach my $this_limit (@limits) { -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19684 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org