Bugzilla – Attachment 107411 Details for
Bug 25995
Log changes to due date using bulk edit tool in circulation log
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25995: Log RENEWAL when "extend due dates" tool is used
Bug-25995-Log-RENEWAL-when-extend-due-dates-tool-i.patch (text/plain), 1.67 KB, created by
Jonathan Druart
on 2020-07-27 11:05:53 UTC
(
hide
)
Description:
Bug 25995: Log RENEWAL when "extend due dates" tool is used
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-07-27 11:05:53 UTC
Size:
1.67 KB
patch
obsolete
>From e4c9ed20c62e9590706ea2cf43f0b75a2243c474 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 27 Jul 2020 13:03:31 +0200 >Subject: [PATCH] Bug 25995: Log RENEWAL when "extend due dates" tool is used > >RENEWAL logs are created when an issue is renewed from the circulation >module. We should log as well when the "extend due dates" tool is used >to renew issues. > >Test plan: >Turn on RenewalLog >Create an issue >Renew it using the "extend due dates" >Confirm that the log has been created >--- > tools/batch_extend_due_dates.pl | 4 ++++ > 1 file changed, 4 insertions(+) > >diff --git a/tools/batch_extend_due_dates.pl b/tools/batch_extend_due_dates.pl >index 572e57bdc9..9878878503 100755 >--- a/tools/batch_extend_due_dates.pl >+++ b/tools/batch_extend_due_dates.pl >@@ -24,6 +24,7 @@ use CGI; > > use C4::Auth qw( get_template_and_user ); > use C4::Output qw( output_html_with_http_headers ); >+use C4::Log qw( logaction ); > use Koha::Checkouts; > use Koha::DateUtils qw( dt_from_string output_pref ); > >@@ -132,6 +133,7 @@ elsif ( $op eq 'modify' ) { > $new_hard_due_date &&= dt_from_string($new_hard_due_date); > my $checkouts = > Koha::Checkouts->search( { issue_id => { -in => \@issue_ids } } ); >+ my $RenewalLog = C4::Context->preference('RenewalLog'); > while ( my $checkout = $checkouts->next ) { > my $new_due_date = calc_new_due_date( > { >@@ -146,6 +148,8 @@ elsif ( $op eq 'modify' ) { > > # Update items.onloan > $checkout->item->onloan($new_due_date)->store; >+ >+ logaction("CIRCULATION", "RENEWAL", $checkout->borrowernumber, $checkout->itemnumber) if $RenewalLog; > } > > $template->param( >-- >2.20.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 25995
:
107411
|
107476
|
107499
|
107500