https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24072 Bug ID: 24072 Summary: Typos in advance_notices.pl causes DUEDGST not to be sent Change sponsored?: --- Product: Koha Version: 18.11 Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Notices Assignee: magnus@libriotech.no Reporter: magnus@libriotech.no QA Contact: testopia@bugs.koha-community.org In misc/cronjobs/advance_notices.pl we have this code: 372 if ($digest_per_branch) { 373 while (my ($branchcode, $digests) = each %$upcoming_digest) { 374 send_digests({ 375 sth => $sth_digest, 376 digests => $digests, 377 letter_code => 'PREDUEDGST', 378 branchcode => $branchcode, 379 get_item_info => sub { 380 my $params = shift; 381 $params->{sth}->execute($params->{borrowernumber}, 382 $params->{borrower_preferences}->{'days_in_advance'}); 383 return sub { 384 $params->{sth}->fetchrow_hashref; 385 }; 386 } 387 }); 388 } 389 390 while (my ($branchcode, $digests) = each %$due_digest) { 391 send_digests({ 392 sth => $sth_digest, 393 digest => $due_digest, ### HERE! 394 letter_code => 'DUEDGST', 395 branchcode => $branchcode, 396 get_item_info => sub { 397 my $params = shift; 398 $params->{sth}->execute($params->{borrowernumber}, 0); 399 return sub { 400 $params->{sth}->fetchrow_hashref; 401 }; 402 } 403 }); 404 } 405 } else { 406 send_digests({ 407 sth => $sth_digest, 408 digests => $upcoming_digest, 409 letter_code => 'PREDUEDGST', 410 get_item_info => sub { 411 my $params = shift; 412 $params->{sth}->execute($params->{borrowernumber}, 413 $params->{borrower_preferences}->{'days_in_advance'}); 414 return sub { 415 $params->{sth}->fetchrow_hashref; 416 }; 417 } 418 }); 419 420 send_digests({ 421 sth => $sth_digest, 422 digest => $due_digest, ### AND HERE! 423 letter_code => 'DUEDGST', 424 get_item_info => sub { 425 my $params = shift; 426 $params->{sth}->execute($params->{borrowernumber}, 0); 427 return sub { 428 $params->{sth}->fetchrow_hashref; 429 }; 430 } 431 }); 432 } A typo has crept in on lines 393 and 422, where "digest" should be written "digests", in the same way as it is done in the other two blocks of code. In send_digests() the incoming data is iterated over in this line: 531 PATRON: while ( my ( $borrowernumber, $digest ) = each %{$params->{digests}} ) { but when the data is actually in $params->{digest} they are not found and no DUEDGST messages are queued. -- You are receiving this mail because: You are watching all bug changes.