Bugzilla – Attachment 91466 Details for
Bug 10352
Cataloguing log search mixing itemnumber/bibnumber
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10352: Display the correct modification logs for bibliographic records
Bug-10352-Display-the-correct-modification-logs-fo.patch (text/plain), 2.50 KB, created by
PTFS Europe Sandboxes
on 2019-07-11 14:31:12 UTC
(
hide
)
Description:
Bug 10352: Display the correct modification logs for bibliographic records
Filename:
MIME Type:
Creator:
PTFS Europe Sandboxes
Created:
2019-07-11 14:31:12 UTC
Size:
2.50 KB
patch
obsolete
>From cd4e433085228f49cff578d58284206bf0f10a9a Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 13 May 2019 10:36:14 -0500 >Subject: [PATCH] Bug 10352: Display the correct modification logs for > bibliographic records > >The 'Modification log" link in the cataloguing module returns confusing >results. The 'object' parameter is the biblionumber, but the all log >from itemnumber=biblionumber will be displayed as well. >Since bug 11473 we have the action_logs.info column that is prefixed by >'item ' or 'biblio ' to disociated an item modification from a biblio >modif. >This patch suggests a quick and dirty approach, use this column to make >sure we are searching for the correct logs. >/!\ As bug 11473 did not update the existing rows, we will no longer display >the logs created prior to this change. > >Test plan: >Make sure you have at least 2 bibliographic records with some items >Make sure you have the biblionumbers of those records that match >existing itemnumbers >Edit them (no matter what you change) >Go to the bibliographic detail page (staff) and click "Modification log" >You should see the correct changes. > >Signed-off-by: hc <hc@interleaf.ie> >--- > tools/viewlog.pl | 15 +++++++++++++-- > 1 file changed, 13 insertions(+), 2 deletions(-) > >diff --git a/tools/viewlog.pl b/tools/viewlog.pl >index f8463c0be1..40e1c6658a 100755 >--- a/tools/viewlog.pl >+++ b/tools/viewlog.pl >@@ -132,10 +132,21 @@ if ($do_it) { > $search_params{user} = $user if $user; > $search_params{module} = { -in => [ @modules ] } if ( defined $modules[0] and $modules[0] ne '' ) ; > $search_params{action} = { -in => [ @actions ] } if ( defined $actions[0] && $actions[0] ne '' ); >- $search_params{object} = $object if $object; >- $search_params{info} = $info if $info; > $search_params{interface} = { -in => [ @interfaces ] } if ( defined $interfaces[0] && $interfaces[0] ne '' ); > >+ >+ if ( @modules == 1 && $modules[0] eq 'CATALOGUING' ) { >+ # Handle 'Modification log' from cataloguing >+ my @itemnumbers = Koha::Items->search({ biblionumber => $object })->get_column('itemnumber'); >+ $search_params{'-or'} = [ >+ { -and => { object => $object, info => { -like => 'biblio %' }}}, >+ { -and => { object => \@itemnumbers, info => { -like => 'item %' }}}, >+ ]; >+ } else { >+ $search_params{info} = $info if $info; >+ $search_params{object} = $object if $object; >+ } >+ > my @logs = Koha::ActionLogs->search(\%search_params); > > my @data; >-- >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 10352
:
89668
|
91466
|
95776
|
95783
|
95784
|
95785
|
95786
|
96273
|
96336
|
97147
|
97148
|
97149
|
97150