Bugzilla – Attachment 165212 Details for
Bug 26744
Log changes to extended patron attributes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26744: Don't delete extended attributes outside of method
Bug-26744-Dont-delete-extended-attributes-outside-.patch (text/plain), 2.31 KB, created by
David Gustafsson
on 2024-04-19 15:14:47 UTC
(
hide
)
Description:
Bug 26744: Don't delete extended attributes outside of method
Filename:
MIME Type:
Creator:
David Gustafsson
Created:
2024-04-19 15:14:47 UTC
Size:
2.31 KB
patch
obsolete
>From abe0ef10ad51e7f7e8f37fde019d64d47da70447 Mon Sep 17 00:00:00 2001 >From: David Gustafsson <david.gustafsson@ub.gu.se> >Date: Fri, 19 Apr 2024 16:27:46 +0200 >Subject: [PATCH] Bug 26744: Don't delete extended attributes outside of method > >And fix bug where $attribute_changes was overwritten >instead of assigned default value. >--- > Koha/Patron.pm | 4 ++-- > members/memberentry.pl | 1 - > 2 files changed, 2 insertions(+), 3 deletions(-) > >diff --git a/Koha/Patron.pm b/Koha/Patron.pm >index 59330fe07dd..e0758b6031c 100644 >--- a/Koha/Patron.pm >+++ b/Koha/Patron.pm >@@ -2133,7 +2133,7 @@ sub extended_attributes { > if (C4::Context->preference("BorrowersLog")) { > for my $attribute ($self->extended_attributes->as_list) { > my $repeatable = $attribute->type->repeatable ? 1 : 0; >- $attribute_changes{$repeatable}->{$attribute_key->($attribute)}->{before} = []; >+ $attribute_changes{$repeatable}->{$attribute_key->($attribute)}->{before} //= []; > push ( > @{$attribute_changes{$repeatable}->{$attribute_key->($attribute)}->{before}}, > $attribute->attribute >@@ -2174,7 +2174,7 @@ sub extended_attributes { > if (C4::Context->preference("BorrowersLog")) { > for my $attribute ($self->extended_attributes->as_list) { > my $repeatable = $attribute->type->repeatable ? 1 : 0; >- $attribute_changes{$repeatable}->{$attribute_key->($attribute)}->{after} = []; >+ $attribute_changes{$repeatable}->{$attribute_key->($attribute)}->{after} //= []; > push ( > @{$attribute_changes{$repeatable}->{$attribute_key->($attribute)}->{after}}, > $attribute->attribute >diff --git a/members/memberentry.pl b/members/memberentry.pl >index b7d8a4a1a48..58deab9287c 100755 >--- a/members/memberentry.pl >+++ b/members/memberentry.pl >@@ -573,7 +573,6 @@ if ((!$nok) and $nodouble and ($op eq 'cud-insert' or $op eq 'cud-save')){ > > if ( $success ) { > if (C4::Context->preference('ExtendedPatronAttributes') and $input->param('setting_extended_patron_attributes')) { >- $patron->extended_attributes->filter_by_branch_limitations->delete; > $patron->extended_attributes($extended_patron_attributes); > } > >-- >2.43.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 26744
:
163957
|
163958
|
163959
|
164034
|
164035
|
164098
|
165212
|
165213
|
165301
|
165302
|
165303
|
165304
|
165305