diff --git a/C4/Biblio.pm b/C4/Biblio.pm index e9c0cd8ce0..4c351a9e94 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -3038,7 +3038,7 @@ sub UpdateTotalIssues { if ($@) { my $exception = $@; $exception->rethrow unless ( $exception->isa('Koha::Exceptions::Metadata::Invalid') ); - warn "UpdateTotalIssues could not get bibliographic record"; + warn "UpdateTotalIssues could not get bibliographic record for biblionumber $biblionumber"; return; } my $biblioitem = $biblio->biblioitem; diff --git a/t/db_dependent/Biblio.t b/t/db_dependent/Biblio.t index 28cdb78c10..c920d2a392 100755 --- a/t/db_dependent/Biblio.t +++ b/t/db_dependent/Biblio.t @@ -1029,6 +1029,7 @@ subtest 'UpdateTotalIssues on Invalid record' => sub { $return_record->mock( 'record', sub { Koha::Exceptions::Metadata::Invalid->throw() } ); my $biblio = $builder->build_sample_biblio; + my $biblionumber = $biblio->biblionumber; my $increase = 1; @@ -1036,7 +1037,7 @@ subtest 'UpdateTotalIssues on Invalid record' => sub { warning_is { $success = C4::Biblio::UpdateTotalIssues( $biblio->biblionumber, $increase, '' ); } - "UpdateTotalIssues could not get bibliographic record", "Expected warning found"; + "UpdateTotalIssues could not get bibliographic record for biblionumber $biblionumber", "Expected warning found"; ok( !$success, 'UpdateTotalIssues fails gracefully for invalid record' );