Bug 26407: fix query in 'title exists' in `search_for_data_inconsistencies.pl`

Bug 23871 added check for 'title exists' to `search_for_data_inconsistencies.pl`.
There is a typo in DBIx query to create or : hashref instead of arrayref.

Test plan :
1) Change title of biblio record XXX in SQL :
   UPDATE biblio SET title = '' WHERE biblionumber=XXX
2) Change title of biblio record YYY in SQL :
   UPDATE biblio SET title = NULL WHERE biblionumber=YYY
3) Run misc/maintenance/search_for_data_inconsistencies.pl
4) Check you see both records

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 15174e7bd3)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Fridolin Somers 2020-09-08 16:54:19 +02:00 committed by Lucas Gass
parent 935e7f088f
commit 6b6650ff90
1 changed files with 6 additions and 1 deletions

View File

@ -196,7 +196,12 @@ use C4::Biblio;
}
{
my $biblios = Koha::Biblios->search({ -or => { title => undef, title => '' }});
my $biblios = Koha::Biblios->search({
-or => [
title => '',
title => undef,
]
});
if ( $biblios->count ) {
my ( $title_tag, $title_subtag ) = C4::Biblio::GetMarcFromKohaField( 'biblio.title' );
my $title_field = $title_tag // '';