From f82513460c7dc58cb5b740d6cf412c1cc72c27e5 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Wed, 6 Aug 2025 15:10:06 +0000 Subject: [PATCH] Bug 39802: Use new preference in longoverdue cron The test plan here is largely confirming that nothing has changed. Using CircControl here has an existing problem - when set to 'PickupLibrary' the check in this cron looks for items from the userenv branch - the cron doesn't have a userenv branch, it is undef, so for any library limiting by branch and with CircControl set to 'PickupLibrary' / 'the library you are logged in at' the cron will do nothing --- misc/cronjobs/longoverdue.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/cronjobs/longoverdue.pl b/misc/cronjobs/longoverdue.pl index d23df572bee..e41862306d7 100755 --- a/misc/cronjobs/longoverdue.pl +++ b/misc/cronjobs/longoverdue.pl @@ -360,7 +360,7 @@ sub longoverdue_sth { } my $dbh = C4::Context->dbh; -my $circ_control_pref = C4::Context->preference('CircControl'); +my $lost_control_pref = C4::Context->preference('LostChargesControl'); my $home_holding_pref = C4::Context->preference('HomeOrHoldingBranch'); my @available_categories = Koha::Patron::Categories->search()->get_column('categorycode'); @@ -482,7 +482,7 @@ foreach my $startrange ( sort keys %$lost ) { } if ($filter_branches) { my $lib; - for ($circ_control_pref) { + for ($lost_control_pref) { if ( $_ eq 'PatronLibrary' ) { $patron ||= Koha::Patrons->find( $row->{borrowernumber} ); $lib = $patron->branchcode(); -- 2.39.5