Bugzilla – Attachment 8244 Details for
Bug 7526
longoverdue.pl leaves items marked as lost as still checked out to patron
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 7526 - longoverdue.pl leaves items marked as lost as still checked out to patron
SIGNED-OFF-Bug-7526---longoverduepl-leaves-items-m.patch (text/plain), 2.83 KB, created by
Nicole C. Engard
on 2012-03-16 20:05:05 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 7526 - longoverdue.pl leaves items marked as lost as still checked out to patron
Filename:
MIME Type:
Creator:
Nicole C. Engard
Created:
2012-03-16 20:05:05 UTC
Size:
2.83 KB
patch
obsolete
>From 6daf2c5bf5108e91bcb920ee8309d96faed0e843 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Fri, 10 Feb 2012 10:12:20 -0500 >Subject: [PATCH] [SIGNED-OFF] Bug 7526 - longoverdue.pl leaves items marked as lost as still checked out to patron > >When the longoverdu.pl script is run, and it marks an item as lost ( using >LostItem() ), if fails to remove the item from the borrower record. So, the >item is marked as lost, but is also still listed as checked out to the >borrower. > >This commit adds the command line parameter --mark-returned. If used, >longoverdue.pl will remove lost items from the borrowers record. >Functionality will remain the same if it is not used. > >Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com> > >http://bugs.koha-community.org/show_bug.cgi?id=7426 >--- > misc/cronjobs/longoverdue.pl | 18 +++++++++++------- > 1 files changed, 11 insertions(+), 7 deletions(-) > >diff --git a/misc/cronjobs/longoverdue.pl b/misc/cronjobs/longoverdue.pl >index 5dca494..159db51 100755 >--- a/misc/cronjobs/longoverdue.pl >+++ b/misc/cronjobs/longoverdue.pl >@@ -41,14 +41,16 @@ use Getopt::Long; > my $lost; # key=lost value, value=num days. > my ($charge, $verbose, $confirm, $quiet); > my $endrange = 366; >+my $mark_returned = 0; > > GetOptions( >- 'lost=s%' => \$lost, >- 'c|charge=s' => \$charge, >- 'confirm' => \$confirm, >- 'verbose' => \$verbose, >- 'quiet' => \$quiet, >- 'maxdays=s' => \$endrange >+ 'lost=s%' => \$lost, >+ 'c|charge=s' => \$charge, >+ 'confirm' => \$confirm, >+ 'verbose' => \$verbose, >+ 'quiet' => \$quiet, >+ 'maxdays=s' => \$endrange, >+ 'mark-returned' => \$mark_returned, > ); > > my $usage = << 'ENDUSAGE'; >@@ -75,6 +77,8 @@ This script takes the following parameters : > --maxdays Specifies the end of the range of overdue days to deal with (defaults to 366). This > value is universal to all lost num days overdue passed. > >+ --mark-returned When an item is marked lost, remove it from the borrowers issued items. >+ > examples : > $PERL5LIB/misc/cronjobs/longoverdue.pl --lost 30=1 > Would set LOST=1 after 30 days (up to one year), but not charge the account. >@@ -161,7 +165,7 @@ foreach my $startrange (sort keys %$lost) { > printf ("Due %s: item %5s from borrower %5s to lost: %s\n", $row->{date_due}, $row->{itemnumber}, $row->{borrowernumber}, $lostvalue) if($verbose); > if($confirm) { > ModItem({ itemlost => $lostvalue }, $row->{'biblionumber'}, $row->{'itemnumber'}); >- LostItem($row->{'itemnumber'}, undef, 'CHARGE FEE') if( $charge && $charge eq $lostvalue); >+ LostItem($row->{'itemnumber'}, $mark_returned, 'CHARGE FEE') if( $charge && $charge eq $lostvalue); > } > $count++; > } >-- >1.7.2.3
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 7526
:
7565
|
7569
|
7570
| 8244