Bugzilla – Attachment 62072 Details for
Bug 15705
Notify the user on auto renewing
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15705: Reset the last error when an auto renew successes
Bug-15705-Reset-the-last-error-when-an-auto-renew-.patch (text/plain), 1.97 KB, created by
Martin Renvoize (ashimema)
on 2017-04-12 08:52:25 UTC
(
hide
)
Description:
Bug 15705: Reset the last error when an auto renew successes
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2017-04-12 08:52:25 UTC
Size:
1.97 KB
patch
obsolete
>From 757e26ba7ce6b7dc0bfce0c3a1bc686054ccafb1 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 30 Mar 2017 13:55:36 -0300 >Subject: [PATCH] Bug 15705: Reset the last error when an auto renew successes > >The auto_renew_error has to be reset when an auto renew successes, >otherwise the patron is not going to receive the correct notice. > >Test plan; >- Checkin an item and mark it as auto renewal (specify a due date in the past to allow auto renewals) >- Set OPACFineNoRenewalsBlockAutoRenew to 'Block' and 'OPACFineNoRenewals' to '1' >- Execute the script >=> Auto renewed, column auto_renew_error is null >- Add a fine of '2' to the patron >- Execute the script >=> Not auto renewed, column auto_renew_error is 'auto_too_much_oweing' >=> On the interface youo see the correct message "Automatic renewal failed, patron has unpaid fines" >- Pay the fine >- Execute the script > >Without this patch the auto_renew_error is not reset and the patron is going to >receive a letter telling him he own too much money to the library >With this patch the patron will receive a letter to inform him the renew has been done! > >Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com> >--- > misc/cronjobs/automatic_renewals.pl | 1 + > 1 file changed, 1 insertion(+) > >diff --git a/misc/cronjobs/automatic_renewals.pl b/misc/cronjobs/automatic_renewals.pl >index de6a3c9..8e6cdfa 100755 >--- a/misc/cronjobs/automatic_renewals.pl >+++ b/misc/cronjobs/automatic_renewals.pl >@@ -61,6 +61,7 @@ while ( my $auto_renew = $auto_renews->next ) { > my ( $ok, $error ) = CanBookBeRenewed( $auto_renew->borrowernumber, $auto_renew->itemnumber ); > if ( $error eq 'auto_renew' ) { > my $date_due = AddRenewal( $auto_renew->borrowernumber, $auto_renew->itemnumber, $auto_renew->branchcode ); >+ $auto_renew->auto_renew_error(undef)->store; > push @{ $report{ $auto_renew->borrowernumber } }, $auto_renew; > } elsif ( $error eq 'too_many' > or $error eq 'on_reserve' >-- >2.1.4
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 15705
:
47470
|
47471
|
47472
|
50336
|
50337
|
50338
|
50341
|
50342
|
50344
|
50345
|
50346
|
50680
|
50681
|
50682
|
50683
|
50732
|
50733
|
56756
|
56757
|
56758
|
56759
|
56760
|
56798
|
56799
|
56981
|
56983
|
57741
|
57742
|
57743
|
57744
|
57745
|
57746
|
57747
|
61080
|
61081
|
61082
|
61083
|
61084
|
61085
|
61086
|
61495
|
61496
|
61497
|
61498
|
61499
|
61500
|
61501
|
61739
|
62072
|
63036
|
63037
|
63138
|
63139
|
63140
|
63141
|
63142
|
63143
|
63144