@@ -, +, @@ 1) Notice that $ perl misc/cronjobs/automatic_renewals.pl -c -s -v returns 255 error code on exit 2) Apply patch 3) Notice the automatic_renewals.pl works now and exit code is 0 4) Make sure /cgi-bin/koha/tools/batch_extend_due_dates.pl works. 5) Try to grep for 'borrower' in Koha source code and see if there are any other join done using the Koha::Checkout or Koha::Old::Checkout objects. --- circ/checkout-notes.pl | 2 +- misc/cronjobs/automatic_renewals.pl | 2 +- tools/batch_extend_due_dates.pl | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) --- a/circ/checkout-notes.pl +++ a/circ/checkout-notes.pl @@ -56,7 +56,7 @@ if ( $action eq 'seen' ) { } } -my $notes = Koha::Checkouts->search({ 'me.note' => { '!=', undef } }, { prefetch => [ 'borrower', { item => 'biblionumber' } ] }); +my $notes = Koha::Checkouts->search({ 'me.note' => { '!=', undef } }, { prefetch => [ 'patron', { item => 'biblionumber' } ] }); $template->param( selected_count => scalar(@issue_ids), action => $action, --- a/misc/cronjobs/automatic_renewals.pl +++ a/misc/cronjobs/automatic_renewals.pl @@ -132,7 +132,7 @@ $verbose = 1 unless $verbose or $confirm; print "Test run only\n" unless $confirm; print "getting auto renewals\n" if $verbose; -my $auto_renews = Koha::Checkouts->search({ auto_renew => 1, 'borrower.autorenew_checkouts' => 1 },{ join => 'borrower'}); +my $auto_renews = Koha::Checkouts->search({ auto_renew => 1, 'patron.autorenew_checkouts' => 1 },{ join => 'patron'}); print "found " . $auto_renews->count . " auto renewals\n" if $verbose; my $renew_digest = {}; --- a/tools/batch_extend_due_dates.pl +++ a/tools/batch_extend_due_dates.pl @@ -59,7 +59,7 @@ elsif ( $op eq 'list' ) { my $dtf = Koha::Database->new->schema->storage->datetime_parser; my $search_params; if (@categorycodes) { - $search_params->{'borrower.categorycode'} = { -in => \@categorycodes }; + $search_params->{'patron.categorycode'} = { -in => \@categorycodes }; } if (@branchcodes) { $search_params->{'me.branchcode'} = { -in => \@branchcodes }; @@ -98,7 +98,7 @@ elsif ( $op eq 'list' ) { my $checkouts = Koha::Checkouts->search( $search_params, { - join => [ 'item', 'borrower' ] + join => [ 'item', 'patron' ] } ); --