Bugzilla – Attachment 140982 Details for
Bug 31203
Cronjobs should log completion as well as logging begin
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31203: Add End action to cronjobs and log viewer
Bug-31203-Add-End-action-to-cronjobs-and-log-viewe.patch (text/plain), 4.01 KB, created by
Nick Clemens (kidclamp)
on 2022-09-26 13:11:54 UTC
(
hide
)
Description:
Bug 31203: Add End action to cronjobs and log viewer
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2022-09-26 13:11:54 UTC
Size:
4.01 KB
patch
obsolete
>From b95f150ab0bba04769d9e1c5410866e8cfdc8bd0 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Thu, 21 Jul 2022 14:53:23 +0000 >Subject: [PATCH] Bug 31203: Add End action to cronjobs and log viewer > >Signed-off-by: David Nind <david@davidnind.com> >--- > C4/Log.pm | 4 +++- > koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt | 3 ++- > misc/cronjobs/advance_notices.pl | 2 +- > 3 files changed, 6 insertions(+), 3 deletions(-) > >diff --git a/C4/Log.pm b/C4/Log.pm >index 2d520013a8..cff2931515 100644 >--- a/C4/Log.pm >+++ b/C4/Log.pm >@@ -133,9 +133,11 @@ Logs the path and name of the calling script plus the information privided by pa > sub cronlogaction { > my $params = shift; > my $info = $params->{info}; >+ my $action = $params->{action}; >+ $action ||= "Run"; > my $loginfo = (caller(0))[1]; > $loginfo .= ' ' . $info if $info; >- logaction( 'CRONJOBS', 'Run', $$, $loginfo ) if C4::Context->preference('CronjobLog'); >+ logaction( 'CRONJOBS', $action, $$, $loginfo ) if C4::Context->preference('CronjobLog'); > } > > 1; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt >index 24fc22f669..2244646ed9 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt >@@ -140,6 +140,7 @@ > [% CASE 'MODIFY_FUND' %]<span>Modify a fund</span> > [% CASE 'DELETE_FUND' %]<span>Delete a fund</span> > [% CASE 'Run' %]<span>Run</span> >+[% CASE 'End' %]<span>End</span> > [% CASE 'EDIT_MAPPINGS' %]<span>Edit mappings</span> > [% CASE 'RESET_MAPPINGS' %]<span>Reset mappings</span> > [% CASE 'SERIAL CLAIM' %]<span>Serial claim</span> >@@ -239,7 +240,7 @@ > <label for="actionALL" class="viewlog"><input type="checkbox" id="actionALL" name="actions" value=""> All</label> > [% END %] > >- [% FOREACH actx IN [ 'ADD' 'DELETE' 'MODIFY' 'ISSUE' 'RETURN' 'RENEW' 'CREATE' 'CANCEL' 'FILL' 'SUSPEND' 'RESUME' 'ADDCIRCMESSAGE' 'DELCIRCMESSAGE' 'STATUS_CHANGE' 'PATRON_NOTICE' 'CHANGE PASS' 'Run' 'EDIT_MAPPINGS' 'RESET_MAPPINGS' 'ADD_BASKET' 'MODIFY_BASKET' 'MODIFY_BASKET_HEADER' 'MODIFY_BASKET_USERS' 'CLOSE_BASKET' 'APPROVE_BASKET' 'REOPEN_BASKET' 'CANCEL_ORDER' 'CREATE_ORDER' 'MODIFY_ORDER' 'CREATE_INVOICE_ADJUSTMENT' 'UPDATE_INVOICE_ADJUSTMENT' 'DELETE_INVOICE_ADJUSTMENT' 'RECEIVE_ORDER' 'MODIFY_BUDGET' 'MODIFY_FUND' 'CREATE_FUND' 'DELETE_FUND' 'OVERDUE' 'EXPIRE' ] %] >+ [% FOREACH actx IN [ 'ADD' 'DELETE' 'MODIFY' 'ISSUE' 'RETURN' 'RENEW' 'CREATE' 'CANCEL' 'FILL' 'SUSPEND' 'RESUME' 'ADDCIRCMESSAGE' 'DELCIRCMESSAGE' 'STATUS_CHANGE' 'PATRON_NOTICE' 'CHANGE PASS' 'Run' 'End' 'EDIT_MAPPINGS' 'RESET_MAPPINGS' 'ADD_BASKET' 'MODIFY_BASKET' 'MODIFY_BASKET_HEADER' 'MODIFY_BASKET_USERS' 'CLOSE_BASKET' 'APPROVE_BASKET' 'REOPEN_BASKET' 'CANCEL_ORDER' 'CREATE_ORDER' 'MODIFY_ORDER' 'CREATE_INVOICE_ADJUSTMENT' 'UPDATE_INVOICE_ADJUSTMENT' 'DELETE_INVOICE_ADJUSTMENT' 'RECEIVE_ORDER' 'MODIFY_BUDGET' 'MODIFY_FUND' 'CREATE_FUND' 'DELETE_FUND' 'OVERDUE' 'EXPIRE' ] %] > [% IF actions.grep(actx).size %] > <label for="action[% actx| replace('\s+', '_') | html %]" class="viewlog"><input type="checkbox" id="action[% actx | replace('\s+', '_') | html %]" name="actions" value="[% actx | html %]" checked="checked"> [% PROCESS translate_log_action action=actx %]</label> > [% ELSE %] >diff --git a/misc/cronjobs/advance_notices.pl b/misc/cronjobs/advance_notices.pl >index 615f98c3c6..3f6a16a5ff 100755 >--- a/misc/cronjobs/advance_notices.pl >+++ b/misc/cronjobs/advance_notices.pl >@@ -637,7 +637,7 @@ sub send_digests { > } > } > >-cronlogaction({ info => "COMPLETED" }); >+cronlogaction({ action => 'End', info => "COMPLETED" }); > > 1; > >-- >2.30.2
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 31203
:
137960
|
137961
|
137962
|
137963
|
137983
|
138695
|
140743
|
140744
|
140745
|
140746
|
140980
|
140981
|
140982
|
140983
|
141128
|
141311
|
141312
|
141313
|
141314
|
141315