Bugzilla – Attachment 118134 Details for
Bug 14233
Add logging support to notices and slips management
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14233: Add filtering of NOTICES type action logs to the logviewer
Bug-14233-Add-filtering-of-NOTICES-type-action-log.patch (text/plain), 8.47 KB, created by
Martin Renvoize (ashimema)
on 2021-03-11 14:50:20 UTC
(
hide
)
Description:
Bug 14233: Add filtering of NOTICES type action logs to the logviewer
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2021-03-11 14:50:20 UTC
Size:
8.47 KB
patch
obsolete
>From d0a775a18da725ad7a735f9ed49df56a3ac2dd08 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Wed, 10 Feb 2021 11:55:22 +0000 >Subject: [PATCH] Bug 14233: Add filtering of NOTICES type action logs to the > logviewer > >This patch adds handling for the new 'NOTICES' type action_logs to the >logviewer page. > >Test plan >1/ Add some 'Notice' action logs by adding a new notice or updateing an >existing notice >2/ Go to the 'Log viewer' under 'Tools' >3/ Note you can filter by 'Notices' >4/ Confirm the changes you made appear in the logs and that the 'Object' >field links back to the updated notice ready for editing. >5/ Signoff > >Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> >Signed-off-by: David Nind <david@davidnind.com> >--- > .../prog/en/modules/tools/viewlog.tt | 44 ++++++++++--------- > tools/viewlog.pl | 10 +++++ > 2 files changed, 33 insertions(+), 21 deletions(-) > >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 961f3cc08e..fe25a98dfc 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt >@@ -96,6 +96,7 @@ > > [% CASE 'SEARCHENGINE' %]Search engine > >+[% CASE 'NOTICES' %]Notices > [% CASE %][% module | html %] > [% END %] > [% END %] >@@ -133,6 +134,7 @@ > [% CASE 'COMMANDLINE' %]Command-line > [% CASE 'API' %]REST API > [% CASE 'CRON' %]Cron job >+[% CASE 'UPGRADE' %]Upgrade > [% CASE %][% log_interface | html %] > [% END %] > [% END %] >@@ -172,7 +174,7 @@ > [% ELSE %] > <label for="moduleALL" class="viewlog"><input type="checkbox" id="moduleALL" name="modules" value=""> All</label> > [% END %] >- [% FOREACH modx IN [ 'AUTH' 'CATALOGUING' 'AUTHORITIES' 'MEMBERS' 'ACQUISITIONS' 'SERIAL' 'HOLDS' 'ILL' 'CIRCULATION' 'LETTER' 'FINES' 'SYSTEMPREFERENCE' 'CRONJOBS', 'REPORTS', 'SEARCHENGINE' ] %] >+ [% FOREACH modx IN [ 'AUTH' 'CATALOGUING' 'AUTHORITIES' 'MEMBERS' 'ACQUISITIONS' 'SERIAL' 'HOLDS' 'ILL' 'CIRCULATION' 'LETTER' 'FINES' 'SYSTEMPREFERENCE' 'CRONJOBS', 'REPORTS', 'SEARCHENGINE', 'NOTICES' ] %] > [% IF modules.grep(modx).size %] > <label for="module[% modx | html %]" class="viewlog"><input type="checkbox" id="module[% modx | html %]" name="modules" value="[% modx | html %]" checked="checked"> [% PROCESS translate_log_module module=modx %]</label> > [% ELSE %] >@@ -306,27 +308,27 @@ > [% ELSE %] > [% loopro.object | html %] > [% END %] >+ [% ELSIF ( loopro.module == 'CATALOGUING' ) %] >+ [% IF ( loopro.info.substr(0, 4) == 'item' ) %] >+ <a href="/cgi-bin/koha/catalogue/moredetail.pl?item=[% loopro.object | uri %]&biblionumber=[% loopro.biblionumber | uri %]&bi=[% loopro.biblioitemnumber | uri %]#item[% loopro.object | uri %]">Item [% loopro.object | html %]</a> from >+ <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% loopro.biblionumber | uri %]" title="Display detail for this biblio">Biblio [% loopro.biblionumber | html %]</a> >+ [% ELSIF ( loopro.info.substr(0, 6) == 'biblio' ) %] >+ <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% loopro.object | uri %]" title="Display detail for this biblio">Biblio [% loopro.object | html %]</a> >+ [% ELSE %] >+ [% loopro.object | html %] >+ [% END %] >+ [% ELSIF ( loopro.module == 'SERIAL' ) %] >+ <a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% loopro.object | uri %]">Subscription [% loopro.object | html %] </a> >+ [% ELSIF ( loopro.module == 'AUTHORITIES' ) %] >+ <a href="/cgi-bin/koha/authorities/detail.pl?authid=[% loopro.object | uri %]" title="Display detail for this authority">Authority [% loopro.object | html %]</a> >+ [% ELSIF ( loopro.module == 'NOTICES' ) %] >+ [% IF ( loopro.notice ) %] >+ <a href="/cgi-bin/koha/tools/letter.pl??op=add_form&branchcode=[% loopro.notice.branchcode | uri %]&module=[% loopro.notice.module | uri %]&code=[% loopro.notice.code | uri %]&lang=[% loopro.notice.lang %]">Notice [% loopro.notice.title | html %]</a> >+ [% ELSE %] >+ [% loopro.object | html %] >+ [% END %] > [% ELSE %] >- [% IF ( loopro.module == 'CATALOGUING' ) %] >- [% IF ( loopro.info.substr(0, 4) == 'item' ) %] >- <a href="/cgi-bin/koha/catalogue/moredetail.pl?item=[% loopro.object | uri %]&biblionumber=[% loopro.biblionumber | uri %]&bi=[% loopro.biblioitemnumber | uri %]#item[% loopro.object | uri %]">Item [% loopro.object | html %]</a> from >- <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% loopro.biblionumber | uri %]" title="Display detail for this biblio">Biblio [% loopro.biblionumber | html %]</a> >- [% ELSIF ( loopro.info.substr(0, 6) == 'biblio' ) %] >- <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% loopro.object | uri %]" title="Display detail for this biblio">Biblio [% loopro.object | html %]</a> >- [% ELSE %] >- [% loopro.object | html %] >- [% END %] >- [% ELSE %] >- [% IF ( loopro.module == 'SERIAL' ) %] >- <a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% loopro.object | uri %]">Subscription [% loopro.object | html %] </a> >- [% ELSE %] >- [% IF ( loopro.module == 'AUTHORITIES' ) %] >- <a href="/cgi-bin/koha/authorities/detail.pl?authid=[% loopro.object | uri %]" title="Display detail for this authority">Authority [% loopro.object | html %]</a> >- [% ELSE %] >- [% loopro.object | html %] >- [% END %] >- [% END %] >- [% END %] >+ [% loopro.object | html %] > [% END %] > </td> > <td> >diff --git a/tools/viewlog.pl b/tools/viewlog.pl >index b58dcbacac..e67e911c40 100755 >--- a/tools/viewlog.pl >+++ b/tools/viewlog.pl >@@ -186,6 +186,16 @@ if ($do_it) { > } > } > } >+ >+ if ( $log->module eq 'NOTICES' ) { >+ if ( $log->object ) { >+ my $notice = Koha::Notice::Templates->find( { id => $log->object } ); >+ if ($notice && $output eq 'screen') { >+ $result->{notice} = $notice->unblessed; >+ } >+ } >+ } >+ > push @data, $result; > } > if ( $output eq "screen" ) { >-- >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 14233
:
116649
|
116650
|
116651
|
116660
|
116661
|
116662
|
116668
|
116671
|
116672
|
116673
|
116674
|
116713
|
116760
|
116761
|
117251
|
117252
|
117253
|
117254
|
117255
|
117256
|
117257
|
117258
|
117259
|
117294
|
117295
|
117296
|
117297
|
117298
|
117299
|
117300
|
117301
|
117302
|
117303
|
117304
|
117311
|
117312
|
117313
|
117314
|
117315
|
117316
|
117317
|
117318
|
117319
|
117320
|
117321
|
117345
|
118132
|
118133
|
118134
|
118135
|
118136
|
118137
|
118138
|
118139
|
118140
|
118141
|
118142
|
118143
|
118155
|
118156
|
118157
|
118158
|
118159
|
118160
|
118161
|
118162
|
118163
|
118164
|
118165
|
118166
|
118167
|
118323
|
119291
|
119292
|
119293
|
119294
|
119312
|
119313
|
119314
|
119315
|
119359
|
119360
|
119361
|
119362
|
119510