Bug 36473: (follow-up) Add biblionumber to warning
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> (cherry picked from commit1b99de33f9
) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> (cherry picked from commitbab05efd81
) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
db3e2e512d
commit
161815ca68
2 changed files with 3 additions and 2 deletions
|
@ -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;
|
||||
|
|
|
@ -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' );
|
||||
|
||||
|
|
Loading…
Reference in a new issue