Bugzilla – Attachment 172629 Details for
Bug 35630
Add ability to log changes to authorized values
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35630: Move Data::Dump to AuthorisedValue.pm
Bug-35630-Move-DataDump-to-AuthorisedValuepm.patch (text/plain), 1.86 KB, created by
Lucas Gass (lukeg)
on 2024-10-10 15:55:14 UTC
(
hide
)
Description:
Bug 35630: Move Data::Dump to AuthorisedValue.pm
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2024-10-10 15:55:14 UTC
Size:
1.86 KB
patch
obsolete
>From 806055424c414da586cec794f1f5339d190bd63a Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Thu, 10 Oct 2024 15:54:39 +0000 >Subject: [PATCH] Bug 35630: Move Data::Dump to AuthorisedValue.pm > >--- > C4/Log.pm | 2 -- > Koha/AuthorisedValue.pm | 15 ++++++++------- > 2 files changed, 8 insertions(+), 9 deletions(-) > >diff --git a/C4/Log.pm b/C4/Log.pm >index 0909b029b0b..d7ad162c4cb 100644 >--- a/C4/Log.pm >+++ b/C4/Log.pm >@@ -124,8 +124,6 @@ sub logaction { > $diff //= encode_json( diff( $original, $updated, noU => 1 ) ) > if $original && ref $updated eq 'HASH'; > >- $infos = Data::Dumper::Dumper( $infos ) if ref $infos; >- > Koha::ActionLog->new( > { > timestamp => \'NOW()', >diff --git a/Koha/AuthorisedValue.pm b/Koha/AuthorisedValue.pm >index c20e9c57fd4..bca214c5d15 100644 >--- a/Koha/AuthorisedValue.pm >+++ b/Koha/AuthorisedValue.pm >@@ -109,12 +109,7 @@ sub store { > if ( C4::Context->preference("AuthorizedValuesLog") ) { > $self->replace_library_limits($branches); > my $action = $new_authorized_value ? 'CREATE' : 'MODIFY'; >- >- logaction( >- 'AUTHORIZEDVALUE', >- $action, >- $self->id, >- { >+ my $output = { > authorised_value => $self->authorised_value, > id => $self->id, > category => $self->category, >@@ -122,7 +117,13 @@ sub store { > lib => $self->lib, > lib_opac => $self->lib_opac, > imageurl => $self->imageurl >- }, >+ }; >+ my $formatted_output = Data::Dumper::Dumper($object); >+ logaction( >+ 'AUTHORIZEDVALUE', >+ $action, >+ $self->id, >+ $formatted_output, > undef, > $original > ); >-- >2.39.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 35630
:
168747
|
168748
|
169027
|
169044
|
169045
|
169046
| 172629