[Bug 17377] New: ES - Take control fields into account
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17377 Bug ID: 17377 Summary: ES - Take control fields into account Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: ASSIGNED Severity: major Priority: P5 - low Component: Searching Assignee: jonathan.druart@bugs.koha-community.org Reporter: jonathan.druart@bugs.koha-community.org QA Contact: testopia@bugs.koha-community.org Depends on: 12478 There is a bug in Koha::SearchEngine::Elasticsearc::Search->json2marc, it assumes that the MARC::Field constructor always takes >= 5 parameters. This assumption is wrong for control fields, to create a control field you need to call the constructor with: MARC::Field->new($tag, $value); Note that I got "Too much data for control field" in the _warning value of my MARC::Field because too many parameters were passed, and the value was undef. That broke the result search links (on the staff interface) for DB with biblio.biblionumber mapped with 001. Other bugs will certainly be fixed by this patch. For instance I got: GetMarcBiblio called with undefined biblionumber at /home/koha/src/opac/opac-search.pl line 664. GetCOinSBiblio called with undefined record at /home/koha/src/opac/opac-search.pl line 665. in my logs. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12478 [Bug 12478] Elasticsearch support for Koha -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17377 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17377 --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 55932 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=55932&action=edit Bug 17377: Add tests for json2marc -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17377 --- Comment #2 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 55933 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=55933&action=edit Bug 17377: ES - Take control fields into account There is a bug in Koha::SearchEngine::Elasticsearc::Search->json2marc, it assumes that the MARC::Field constructor always takes >= 5 parameters. This assumption is wrong for control fields, to create a control field you need to call the constructor with: MARC::Field->new($tag, $value); Note that I got "Too much data for control field" in the _warning value of my MARC::Field because too many parameters were passed, and the value was undef. That broke the result search links (on the staff interface) for DB with biblio.biblionumber mapped with 001. Other bugs will certainly be fixed by this patch. For instance I got: GetMarcBiblio called with undefined biblionumber at /home/koha/src/opac/opac-search.pl line 664. GetCOinSBiblio called with undefined record at /home/koha/src/opac/opac-search.pl line 665. in my logs, with this patch I don't get them anymore. Test plan: You can try to recreate the different issues and confirm than this patch fixes them. Or just run the tests -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17377 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|ES - Take control fields |ES - control fields are not |into account |taken into account -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17377 Nick Clemens <nick@bywatersolutions.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=17377 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #55932|0 |1 is obsolete| | --- Comment #3 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 55954 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=55954&action=edit Bug 17377: Add tests for json2marc Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17377 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #55933|0 |1 is obsolete| | --- Comment #4 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 55955 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=55955&action=edit Bug 17377: ES - Take control fields into account There is a bug in Koha::SearchEngine::Elasticsearc::Search->json2marc, it assumes that the MARC::Field constructor always takes >= 5 parameters. This assumption is wrong for control fields, to create a control field you need to call the constructor with: MARC::Field->new($tag, $value); Note that I got "Too much data for control field" in the _warning value of my MARC::Field because too many parameters were passed, and the value was undef. That broke the result search links (on the staff interface) for DB with biblio.biblionumber mapped with 001. Other bugs will certainly be fixed by this patch. For instance I got: GetMarcBiblio called with undefined biblionumber at /home/koha/src/opac/opac-search.pl line 664. GetCOinSBiblio called with undefined record at /home/koha/src/opac/opac-search.pl line 665. in my logs, with this patch I don't get them anymore. Test plan: You can try to recreate the different issues and confirm than this patch fixes them. Or just run the tests Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17377 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@bywatersolutions.com --- Comment #5 from Nick Clemens <nick@bywatersolutions.com> --- I can't recreate the errors, but code looks correct Tests pass with caveat that the very first run failed, I can no longer recreate that problem though and don't see an issue in the tests -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17377 Martin Renvoize <martin.renvoize@ptfs-europe.com> 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=17377 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #55954|0 |1 is obsolete| | --- Comment #6 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 57620 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=57620&action=edit [PASSED QA] Bug 17377: Add tests for json2marc Signed-off-by: Nick Clemens <nick@bywatersolutions.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=17377 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #55955|0 |1 is obsolete| | --- Comment #7 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 57621 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=57621&action=edit [PASSED QA] Bug 17377: ES - Take control fields into account There is a bug in Koha::SearchEngine::Elasticsearc::Search->json2marc, it assumes that the MARC::Field constructor always takes >= 5 parameters. This assumption is wrong for control fields, to create a control field you need to call the constructor with: MARC::Field->new($tag, $value); Note that I got "Too much data for control field" in the _warning value of my MARC::Field because too many parameters were passed, and the value was undef. That broke the result search links (on the staff interface) for DB with biblio.biblionumber mapped with 001. Other bugs will certainly be fixed by this patch. For instance I got: GetMarcBiblio called with undefined biblionumber at /home/koha/src/opac/opac-search.pl line 664. GetCOinSBiblio called with undefined record at /home/koha/src/opac/opac-search.pl line 665. in my logs, with this patch I don't get them anymore. Test plan: You can try to recreate the different issues and confirm than this patch fixes them. Or just run the tests Signed-off-by: Nick Clemens <nick@bywatersolutions.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=17377 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com --- Comment #8 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Thanks Jonathan, all works as expected, passing QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17377 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com Status|Passed QA |Pushed to Master --- Comment #9 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to master for 16.11, thanks Jonathan! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17377 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtj@kohaaloha.com --- Comment #10 from Mason James <mtj@kohaaloha.com> --- Pushed to 16.05.x, will be in 16.05.06 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org