Bugzilla – Attachment 33980 Details for
Bug 11872
Lost overdue items should not generate fines
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 11872 - Lost overdue items should not generate fines
PASSED-QA-Bug-11872---Lost-overdue-items-should-no.patch (text/plain), 2.79 KB, created by
Martin Renvoize (ashimema)
on 2014-11-27 09:00:40 UTC
(
hide
)
Description:
[PASSED QA] Bug 11872 - Lost overdue items should not generate fines
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2014-11-27 09:00:40 UTC
Size:
2.79 KB
patch
obsolete
>From 855a13604dd2e496447e3a4da604f2312688afe8 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Tue, 29 Jul 2014 12:39:15 -0400 >Subject: [PATCH] [PASSED QA] Bug 11872 - Lost overdue items should not > generate fines > >An item can be marked as lost by longoverdue.pl, but left checked out to >the patron. In this case, the item will continue to accrue fines. > >Test Plan: >1) Check out an item and back date it so it is overdue and should > generate fines. >2) Mark the item as lost by either using longoverdue.pl, or just > by setting itemlost to 1 by directly accessing the database >3) Run fines.pl >4) Note the overdue generated a fine >5) Repeat steps 1-2 >6) Apply this patch >7) Run fines.pl >8) Note a fine was not generated > >Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > C4/Overdues.pm | 4 ++-- > misc/cronjobs/fines.pl | 2 ++ > misc/cronjobs/staticfines.pl | 1 + > 3 files changed, 5 insertions(+), 2 deletions(-) > >diff --git a/C4/Overdues.pm b/C4/Overdues.pm >index 185584f..1797923 100644 >--- a/C4/Overdues.pm >+++ b/C4/Overdues.pm >@@ -109,14 +109,14 @@ sub Getoverdues { > my $statement; > if ( C4::Context->preference('item-level_itypes') ) { > $statement = " >- SELECT issues.*, items.itype as itemtype, items.homebranch, items.barcode >+ SELECT issues.*, items.itype as itemtype, items.homebranch, items.barcode, items.itemlost > FROM issues > LEFT JOIN items USING (itemnumber) > WHERE date_due < NOW() > "; > } else { > $statement = " >- SELECT issues.*, biblioitems.itemtype, items.itype, items.homebranch, items.barcode >+ SELECT issues.*, biblioitems.itemtype, items.itype, items.homebranch, items.barcode, items.itemlost > FROM issues > LEFT JOIN items USING (itemnumber) > LEFT JOIN biblioitems USING (biblioitemnumber) >diff --git a/misc/cronjobs/fines.pl b/misc/cronjobs/fines.pl >index 02bde14..38c344a 100755 >--- a/misc/cronjobs/fines.pl >+++ b/misc/cronjobs/fines.pl >@@ -95,6 +95,8 @@ if ($filename) { > my $counted = 0; > my $overdues = Getoverdues(); > for my $overdue ( @{$overdues} ) { >+ next if $overdue->{itemlost}; >+ > if ( !defined $overdue->{borrowernumber} ) { > carp > "ERROR in Getoverdues : issues.borrowernumber IS NULL. Repair 'issues' table now! Skipping record.\n"; >diff --git a/misc/cronjobs/staticfines.pl b/misc/cronjobs/staticfines.pl >index 2520fc5..d8d406d 100755 >--- a/misc/cronjobs/staticfines.pl >+++ b/misc/cronjobs/staticfines.pl >@@ -138,6 +138,7 @@ my ($tyear, $tmonth, $tday) = split( /-/, $today_iso ); > $today_days = Date_to_Days( $tyear, $tmonth, $tday ); > > for ( my $i = 0 ; $i < scalar(@$data) ; $i++ ) { >+ next if $data->[$i]->{'itemlost'}; > my $datedue; > my $datedue_days; > eval { >-- >1.7.10.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 11872
:
25720
|
25830
|
29228
|
30294
|
33913
| 33980