Bugzilla – Attachment 195221 Details for
Bug 40136
Record diff in action logs when modifying a patron
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40136: (follow-up) Strip undef and empty fields from patron log data
82d0383.patch (text/plain), 1.13 KB, created by
Lisette Scheer
on 2026-03-12 20:22:12 UTC
(
hide
)
Description:
Bug 40136: (follow-up) Strip undef and empty fields from patron log data
Filename:
MIME Type:
Creator:
Lisette Scheer
Created:
2026-03-12 20:22:12 UTC
Size:
1.13 KB
patch
obsolete
>From 82d03836ee5e3b202848fa8a333ca94f99e28d61 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@openfifth.co.uk> >Date: Tue, 10 Mar 2026 09:39:18 +0000 >Subject: [PATCH] Bug 40136: (follow-up) Strip undef and empty fields from > patron log data > >Exclude fields with undef or empty string values from _unblessed_for_log >so that CREATE and DELETE log diffs only show fields with meaningful values. > >Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com> >--- > Koha/Patron.pm | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > >diff --git a/Koha/Patron.pm b/Koha/Patron.pm >index 9ab86dc27a2..7ad14075760 100644 >--- a/Koha/Patron.pm >+++ b/Koha/Patron.pm >@@ -3665,7 +3665,11 @@ sub _unblessed_for_log { > my $data = $self->unblessed; > delete @{$data}{qw(password lastseen updated_on)}; > for my $key ( keys %$data ) { >- $data->{$key} = "$data->{$key}" if blessed( $data->{$key} ); >+ if ( defined $data->{$key} && $data->{$key} ne '' ) { >+ $data->{$key} = "$data->{$key}" if blessed( $data->{$key} ); >+ } else { >+ delete $data->{$key}; >+ } > } > return $data; > } >-- >2.39.5 >
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 40136
:
194872
|
194940
|
195036
|
195037
|
195046
|
195083
|
195084
|
195085
|
195086
|
195087
|
195126
|
195159
|
195218
|
195219
|
195220
| 195221 |
195222
|
195223
|
195224