Bug 26972

Summary: Test suite does not pass with Elasticsearch for Item.t test
Product: Koha Reporter: Joonas Kylmälä <joonas.kylmala>
Component: Test SuiteAssignee: Nick Clemens <nick>
Status: RESOLVED DUPLICATE QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: david, jonathan.druart
Version: master   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26250
Change sponsored?: --- Patch complexity: ---
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 26507    
Bug Blocks:    

Description Joonas Kylmälä 2020-11-09 11:22:32 UTC
If the searchengine syspref is set to Elasticsearch then the Item.t test doesn't pass:

> root@kohadevbox:koha(master)$ prove t/db_dependent/Koha/Item.t
> t/db_dependent/Koha/Item.t .. 1/7 Use of uninitialized value $code_wanted in string eq at /usr/share/perl5/MARC/Field.pm line 314.
> Use of uninitialized value $code_wanted in string eq at /usr/share/perl5/MARC/Field.pm line 314.
> Use of uninitialized value $code_wanted in string eq at /usr/share/perl5/MARC/Field.pm line 314.
> Use of uninitialized value $code_wanted in string eq at /usr/share/perl5/MARC/Field.pm line 314.
> Use of uninitialized value $code_wanted in string eq at /usr/share/perl5/MARC/Field.pm line 314.
> Use of uninitialized value $code_wanted in string eq at /usr/share/perl5/MARC/Field.pm line 314.
> Use of uninitialized value $code_wanted in string eq at /usr/share/perl5/MARC/Field.pm line 314.
> Use of uninitialized value $code_wanted in string eq at /usr/share/perl5/MARC/Field.pm line 314.
> Use of uninitialized value $code_wanted in string eq at /usr/share/perl5/MARC/Field.pm line 314.
> Use of uninitialized value $code_wanted in string eq at /usr/share/perl5/MARC/Field.pm line 314.
> Use of uninitialized value $code_wanted in string eq at /usr/share/perl5/MARC/Field.pm line 314.
> Use of uninitialized value $code_wanted in string eq at /usr/share/perl5/MARC/Field.pm line 314.
> Use of uninitialized value $code_wanted in string eq at /usr/share/perl5/MARC/Field.pm line 314.
> 
>     #   Failed test 'Value is mapped correctly for column biblionumber'
>     #   at t/db_dependent/Koha/Item.t line 115.
>     #          got: undef
>     #     expected: '441'
Comment 1 David Nind 2020-11-09 19:41:56 UTC
Can confirm (master, koha-testing-docker, ku).
Comment 2 Jonathan Druart 2020-11-10 08:59:55 UTC
Caused by
  commit af9938c43feaa76bf1b1bb0a0e4b21ff7fbbe449
  Bug 26507: Elasticsearch - Index records after storing new item