Bugzilla – Attachment 140824 Details for
Bug 31595
Import patrons tool should not process extended attributes if no attributes are being imported
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31595: Don't process extended attributes if none are inlcuded in the file
Bug-31595-Dont-process-extended-attributes-if-none.patch (text/plain), 1.58 KB, created by
Nick Clemens (kidclamp)
on 2022-09-21 16:12:37 UTC
(
hide
)
Description:
Bug 31595: Don't process extended attributes if none are inlcuded in the file
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2022-09-21 16:12:37 UTC
Size:
1.58 KB
patch
obsolete
>From aa552e8e118c383665d271fbdebae78c07d9fefc Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Wed, 21 Sep 2022 16:10:34 +0000 >Subject: [PATCH] Bug 31595: Don't process extended attributes if none are > inlcuded in the file > >This patch simply adds a check to the import process to only process attrbutes if >they have been found in the data > >To test: >1 - Import some patrons without extended attributes >2 - Import patrons including extended attributes >3 - Confirm both work unchanged >--- > Koha/Patrons/Import.pm | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/Koha/Patrons/Import.pm b/Koha/Patrons/Import.pm >index bb5f820400..7d661a4228 100644 >--- a/Koha/Patrons/Import.pm >+++ b/Koha/Patrons/Import.pm >@@ -331,7 +331,7 @@ sub import_patrons { > } > } > } >- if ($extended) { >+ if ($extended && @$patron_attributes) { > if ($ext_preserve) { > $patron_attributes = $patron->extended_attributes->merge_and_replace_with( $patron_attributes ); > } >@@ -391,7 +391,7 @@ sub import_patrons { > ); > } > >- if ($extended) { >+ if ($extended && @$patron_attributes) { > # FIXME Hum, we did not filter earlier and now we do? > $patron->extended_attributes->filter_by_branch_limitations->delete; > $patron->extended_attributes($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 31595
:
140824
|
140840
|
141539