Bugzilla – Attachment 72544 Details for
Bug 12812
Longoverdue.pl --mark-returned doesn't return items
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12812: Longoverdue.pl --mark-returned doesn't return items
Bug-12812-Longoverduepl---mark-returned-doesnt-ret.patch (text/plain), 1.82 KB, created by
Josef Moravec
on 2018-03-09 06:52:31 UTC
(
hide
)
Description:
Bug 12812: Longoverdue.pl --mark-returned doesn't return items
Filename:
MIME Type:
Creator:
Josef Moravec
Created:
2018-03-09 06:52:31 UTC
Size:
1.82 KB
patch
obsolete
>From 6521cd866755078ffac26a4cd0e9c2be59acd912 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatetsolutions.com> >Date: Thu, 8 Feb 2018 06:39:39 -0500 >Subject: [PATCH] Bug 12812: Longoverdue.pl --mark-returned doesn't return > items > >The longoverdue.pl option --mark-returned doesn't work unless the >--charge option is used as well. > >Test Plan: >1) Run long overdue with --mark-returned and not --charge, > note your items are marked lost but not returned >2) Apply this patch >3) Repeat step 1, the items should now get returned! > >Tested with (for example): >misc/cronjobs/longoverdue.pl --lost 10=1 --mark-returned --verbose >--confirm > >Signed-off-by: Josef Moravec <josef.moravec@gmail.com> >--- > misc/cronjobs/longoverdue.pl | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > >diff --git a/misc/cronjobs/longoverdue.pl b/misc/cronjobs/longoverdue.pl >index 7ff8826..4fecb3b 100755 >--- a/misc/cronjobs/longoverdue.pl >+++ b/misc/cronjobs/longoverdue.pl >@@ -309,7 +309,12 @@ 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'}, $mark_returned) if( $charge && $charge eq $lostvalue); >+ if ( $charge && $charge eq $lostvalue ) { >+ LostItem( $row->{'itemnumber'}, $mark_returned ); >+ } elsif ( $mark_returned ) { >+ my $patron = Koha::Patrons->find( $row->{borrowernumber} ); >+ MarkIssueReturned($row->{borrowernumber},$row->{itemnumber},undef,undef,$patron->privacy) >+ } > } > $count++; > } >-- >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 12812
:
71336
|
72544
|
72545
|
72564
|
72565