Bugzilla – Attachment 141539 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.70 KB, created by
Katrin Fischer
on 2022-10-08 10:17:39 UTC
(
hide
)
Description:
Bug 31595: Don't process extended attributes if none are inlcuded in the file
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2022-10-08 10:17:39 UTC
Size:
1.70 KB
patch
obsolete
>From eb358ecc5cc3bec6dece014027333797c9c448d0 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 > >Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > 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