Bugzilla – Attachment 106433 Details for
Bug 25893
Log viewer no longer searches using wildcards
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25893: Use wildcards when searching logs
Bug-25893-Use-wildcards-when-searching-logs.patch (text/plain), 2.79 KB, created by
Andrew Fuerste-Henry
on 2020-06-30 14:52:01 UTC
(
hide
)
Description:
Bug 25893: Use wildcards when searching logs
Filename:
MIME Type:
Creator:
Andrew Fuerste-Henry
Created:
2020-06-30 14:52:01 UTC
Size:
2.79 KB
patch
obsolete
>From 8bc5e058a49544ba2a370661a5be39bebef05462 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Mon, 29 Jun 2020 18:15:39 +0000 >Subject: [PATCH] Bug 25893: Use wildcards when searching logs > >The restores the wildcards that were used in the past > >I also clean up a few warns and unused param > >To test: > 0 - Ensure cataloguing logs and issues logs are enabled > 1 - Edit an item > 2 - Circulate that same item > 3 - Browse to tools-> log viewer > 4 - Put the itemnumber in the 'info' box > 5 - You see only the circulation > 6 - Put the itemnumber in the object box > 7 - You see only the cataloging modification > 8 - Apply patch > 9 - Put itemnumber in info box >10 - you see both actions >11 - Put the itemnumber in the object box >12 - You see only the catalogiong modification > >Signed-off-by: Jason Robb <jrobb@sekls.org> >--- > tools/viewlog.pl | 9 +++------ > 1 file changed, 3 insertions(+), 6 deletions(-) > >diff --git a/tools/viewlog.pl b/tools/viewlog.pl >index 2ccd472f0e..c3b84e7053 100755 >--- a/tools/viewlog.pl >+++ b/tools/viewlog.pl >@@ -29,7 +29,6 @@ use C4::Output; > use C4::Items; > use C4::Serials; > use C4::Debug; >-use C4::Search; # enabled_staff_search_views > > use Koha::ActionLogs; > use Koha::Database; >@@ -54,7 +53,7 @@ my $user = $input->param("user") // ''; > my @actions = $input->multi_param("actions"); > my @interfaces = $input->multi_param("interfaces"); > my $object = $input->param("object"); >-my $object_type = $input->param("object_type"); >+my $object_type = $input->param("object_type") // ''; > my $info = $input->param("info"); > my $datefrom = $input->param("from"); > my $dateto = $input->param("to"); >@@ -90,7 +89,6 @@ if ( $src eq 'circ' ) { > > $template->param( > debug => $debug, >- C4::Search::enabled_staff_search_views, > subscriptionsnumber => CountSubscriptionFromBiblionumber(scalar $input->param('object')), > object => $object, > ); >@@ -135,7 +133,6 @@ if ($do_it) { > $search_params{action} = { -in => [ @actions ] } if ( defined $actions[0] && $actions[0] ne '' ); > $search_params{interface} = { -in => [ @interfaces ] } if ( defined $interfaces[0] && $interfaces[0] ne '' ); > >- > if ( @modules == 1 && $object_type eq 'biblio' ) { > # Handle 'Modification log' from cataloguing > my @itemnumbers = Koha::Items->search({ biblionumber => $object })->get_column('itemnumber'); >@@ -144,8 +141,8 @@ if ($do_it) { > { -and => { object => \@itemnumbers, info => { -like => 'item%' }}}, > ]; > } else { >- $search_params{info} = $info if $info; >- $search_params{object} = $object if $object; >+ $search_params{info} = { -like => '%' . $info . '%' } if $info; >+ $search_params{object} = { -like => '%' . $object . '%'} if $object; > } > > my @logs = Koha::ActionLogs->search(\%search_params); >-- >2.11.0
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 25893
:
106415
|
106433
|
106602
|
106891
|
107084
|
107802
|
107803
|
107869