Bugzilla – Attachment 49377 Details for
Bug 14784
Missing checkin message for debarred patrons when issuing rules 'fine days = 0'
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14784 : Fix checkin message for debarred patrons
Bug-14784--Fix-checkin-message-for-debarred-patron.patch (text/plain), 2.51 KB, created by
Katrin Fischer
on 2016-03-21 06:48:51 UTC
(
hide
)
Description:
Bug 14784 : Fix checkin message for debarred patrons
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2016-03-21 06:48:51 UTC
Size:
2.51 KB
patch
obsolete
>From dbcf055b56556bf4148053f00c27e6c9cdd803f1 Mon Sep 17 00:00:00 2001 >From: genevieve <genevieve.plantin@inlibro.com> >Date: Thu, 3 Sep 2015 16:40:00 -0400 >Subject: [PATCH] Bug 14784 : Fix checkin message for debarred patrons > >If there is an overdue but finedays equals 0, then >we have to see if the patron is debarred and if he >was forever debarred. So we have to go through the >same code a if it was a debarred patron with no overdue. > >Test plan : >1)Apply patch >2)Select an existing patron that doesn't have an oustanding fine >3)Check out a book for this patron >4)Click the "Restriction" tab >5)Click "Add manual restriction" >6)Write any comment and leave expiration date blank >7)Validate text on patron's checkout page: > "Cannot check out! > Restricted: Patron's account is restricted with the explanation:" >8)Check in the book that you checked out at step 2 >9)Validate the warning message: > > "Check in message > 013880: Heart health for Canadians : > Reminder: Patron has an indefinite restriction." > >Then you can redo these steps and change the date at step 6 >to see different messages at step 8. > >Signed-off-by: barton <barton@bywatersolutions.com> >--- > C4/Circulation.pm | 10 +++++++++- > 1 file changed, 9 insertions(+), 1 deletion(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index a1d7815..f6b99d6 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -2074,6 +2074,7 @@ sub AddReturn { > } > } > >+ my $show_checkin_message = 0; > # fix up the overdues in accounts... > if ($borrowernumber) { > my $fix = _FixOverduesOnReturn($borrowernumber, $item->{itemnumber}, $exemptfine, $dropbox); >@@ -2088,8 +2089,15 @@ sub AddReturn { > } else { > $messages->{'Debarred'} = $debardate if $debardate; > } >+ if (!$debardate && $borrower->{debarred}) { >+ $show_checkin_message = 1; >+ } > # there's no overdue on the item but borrower had been previously debarred > } elsif ( $issue->{date_due} and $borrower->{'debarred'} ) { >+ $show_checkin_message = 1; >+ } >+ >+ if ($show_checkin_message) { > if ( $borrower->{debarred} eq "9999-12-31") { > $messages->{'ForeverDebarred'} = $borrower->{'debarred'}; > } else { >@@ -2099,7 +2107,7 @@ sub AddReturn { > if ( DateTime->compare( $borrower_debar_dt, $today_dt ) != -1 ) { > $messages->{'PrevDebarred'} = $borrower->{'debarred'}; > } >- } >+ } > } > } > >-- >1.9.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 14784
:
42354
|
49282
|
49283
|
49377
|
58227
|
67102
|
68132
|
69295
|
69296
|
77683
|
79826
|
106808
|
106809
|
107487
|
110485
|
110514
|
110763
|
110764
|
112724
|
112725
|
136040
|
136327
|
137727
|
137728
|
145320
|
145321