Bugzilla – Attachment 109220 Details for
Bug 15157
Cronjob to automatically restrict patrons with pending/unpaid charges
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15157: Update script
0001-Bug-15157-Update-script.patch (text/plain), 1.69 KB, created by
Emmi Takkinen
on 2020-08-27 10:06:24 UTC
(
hide
)
Description:
Bug 15157: Update script
Filename:
MIME Type:
Creator:
Emmi Takkinen
Created:
2020-08-27 10:06:24 UTC
Size:
1.69 KB
patch
obsolete
>From 0de892b307497e058ff8a865ae3221cbe9b3beba Mon Sep 17 00:00:00 2001 >From: Emmi Takkinen <emmi.takkinen@outlook.com> >Date: Thu, 27 Aug 2020 13:03:16 +0300 >Subject: [PATCH] Bug 15157: Update script > >This patch updates debarrBorrowersWithFines.pl script to match >changes made in bug 15156. > >To test: >1. Have patron(s) with unpaid fines >2. Run e.g debarrBorrowersWithFines.pl --confirm -m "This is a description of you bad deeds" >(test other options too) >3. Confirm patron(s) with fines has been debarred with the explanation > >Sponsored-by: Koha-Suomi Oy >--- > misc/debarrBorrowersWithFines.pl | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > >diff --git a/misc/debarrBorrowersWithFines.pl b/misc/debarrBorrowersWithFines.pl >index 5192bc06b7..fb46a6f351 100644 >--- a/misc/debarrBorrowersWithFines.pl >+++ b/misc/debarrBorrowersWithFines.pl >@@ -4,7 +4,8 @@ use Modern::Perl; > use Getopt::Long; > > use C4::Accounts; >-use Koha::Borrower::Debarments; >+use Koha::Patrons; >+use Koha::Patron::Debarments; > > my ($help, $confirm, $message, $expiration, $file); > GetOptions( >@@ -59,13 +60,13 @@ elsif (not($file) && not(length($message) > 20)) { > exit 1; > } > >-my $badBorrowers = C4::Accounts::GetAllBorrowersWithUnpaidFines(); >+my $badBorrowers = Koha::Patrons->search->search_patrons_with_unpaid_fines(); > $message = getMessageContent(); > > foreach my $bb (@$badBorrowers) { > #Don't crash, but keep debarring as long as you can! > eval { >- my $success = Koha::Borrower::Debarments::AddDebarment({ >+ my $success = Koha::Patron::Debarments::AddDebarment({ > borrowernumber => $bb->{borrowernumber}, > expiration => $expiration, > type => 'MANUAL', >-- >2.17.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 15157
:
44643
|
44645
|
44646
|
109220
|
124894
|
124895
|
124896
|
129701
|
129702
|
129703
|
129704
|
130103
|
158288
|
158289
|
158290
|
158291
|
158292
|
158315
|
158316
|
158317
|
158318