diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref
index b755959944..dbc2306bd2 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref
@@ -451,6 +451,23 @@ Circulation:
- "."
-
Leave this field empty if you don't want to skip any LOST statuses.
-
Set to a list of comma separated values, e.g. 5,6,7.
+ -
+ - pref: DefaultLongOverdueBorrowerCategories
+ choices: patron-categories
+ class: multiple
+ - the borrower categories that will be listed. Exclude all others.
+ -
WARNING — This preference will be active only if DefaultLongOverdueSkipBorrowerCategories is empty.
+ - "
NOTE: This system preference requires the misc/cronjobs/longoverdue.pl cronjob. Ask your system administrator to schedule it."
+
+
+ -
+ - pref: DefaultLongOverdueSkipBorrowerCategories
+ choices: patron-categories
+ class: multiple
+ - the borrower categories that will not be listed. Include all others.
+ -
WARNING - This preference overrides the DefaultLongOverdueBorrowerCategories preference, so the DefaultLongOverdueBorrowerCategories filter will not take effect.
+ - "
NOTE: This system preference requires the misc/cronjobs/longoverdue.pl cronjob. Ask your system administrator to schedule it."
+
-
- "When issuing an item that has been marked as lost, "
- pref: IssueLostItem
diff --git a/misc/cronjobs/longoverdue.pl b/misc/cronjobs/longoverdue.pl
index 2d313b77b2..06cd6b2830 100755
--- a/misc/cronjobs/longoverdue.pl
+++ b/misc/cronjobs/longoverdue.pl
@@ -275,6 +275,17 @@ if ( ! defined($charge) ) {
$charge = $charge_value;
}
}
+
+if ( C4::Context->preference('DefaultLongOverdueBorrowerCategories') ) {
+ my $categories = C4::Context->preference('DefaultLongOverdueBorrowerCategories');
+ $borrower_category = [ split( ',', $categories ) ];
+}
+
+if ( C4::Context->preference('DefaultLongOverdueSkipBorrowerCategories') ) {
+ my $categories = C4::Context->preference('DefaultLongOverdueSkipBorrowerCategories');
+ $skip_borrower_category = [ split( ',', $categories ) ];
+}
+
unless ($confirm) {
$verbose = 1; # If you're not running it for real, then the whole point is the print output.
print "### TEST MODE -- NO ACTIONS TAKEN ###\n";