Bugzilla – Attachment 165304 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.36 KB, created by
Clemens Tubach
on 2024-04-22 14:10:41 UTC
(
hide
)
Description:
Bug 26744: Don't delete extended attributes outside of method
Filename:
MIME Type:
Creator:
Clemens Tubach
Created:
2024-04-22 14:10:41 UTC
Size:
2.36 KB
patch
obsolete
>From 80c194907c9ae9f758a2c43c1933e31fdaa2551a 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. > >Signed-off-by: Clemens Tubach <clemens.tubach@kit.edu> >--- > 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 b2e58ae11b..048553c6b4 100644 >--- a/Koha/Patron.pm >+++ b/Koha/Patron.pm >@@ -2140,7 +2140,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 >@@ -2181,7 +2181,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 e28e8c1449..ca2f2368f8 100755 >--- a/members/memberentry.pl >+++ b/members/memberentry.pl >@@ -569,7 +569,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.30.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 26744
:
163957
|
163958
|
163959
|
164034
|
164035
|
164098
|
165212
|
165213
|
165301
|
165302
|
165303
|
165304
|
165305
|
177605
|
177652