[Koha-bugs] [Bug 17377] ES - control fields are not taken into account

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Nov 18 10:07:13 CET 2016


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17377

Martin Renvoize <martin.renvoize at ptfs-europe.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #55955|0                           |1
        is obsolete|                            |

--- Comment #7 from Martin Renvoize <martin.renvoize at 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 at bywatersolutions.com>

Signed-off-by: Martin Renvoize <martin.renvoize at ptfs-europe.com>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list