Bug 35169: Make long overdue borrower category options configurable in interface

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Matthias Le Gac 2024-02-22 14:46:22 -05:00 committed by Katrin Fischer
parent 5e06fd00ce
commit 7c9a7fe7ff
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
2 changed files with 28 additions and 0 deletions

View File

@ -451,6 +451,23 @@ Circulation:
- "."
- <br>Leave this field empty if you don't want to skip any <a href="/cgi-bin/koha/admin/authorised_values.pl?searchfield=LOST">LOST</a> statuses.
- <br>Set to a list of comma separated values, e.g. <em>5,6,7</em>.
-
- pref: DefaultLongOverdueBorrowerCategories
choices: patron-categories
class: multiple
- the borrower categories that will be listed. Exclude all others.
- <br>WARNING — This preference will be active only if DefaultLongOverdueSkipBorrowerCategories is empty.
- "<br><strong>NOTE:</strong> This system preference requires the <code>misc/cronjobs/longoverdue.pl</code> 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.
- <br>WARNING - This preference overrides the DefaultLongOverdueBorrowerCategories preference, so the DefaultLongOverdueBorrowerCategories filter will not take effect.
- "<br><strong>NOTE:</strong> This system preference requires the <code>misc/cronjobs/longoverdue.pl</code> cronjob. Ask your system administrator to schedule it."
-
- "When issuing an item that has been marked as lost, "
- pref: IssueLostItem

View File

@ -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";