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 Sponsored-by: MAIN Library Alliance Signed-off-by: Trevor Diamond <trevor.diamond@mainlib.org> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
aee1c8f7a5
commit
95789607e2
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Reference in New Issue