Bug 31595

Summary: Import patrons tool should not process extended attributes if no attributes are being imported
Product: Koha Reporter: Nick Clemens (kidclamp) <nick>
Component: ToolsAssignee: Nick Clemens (kidclamp) <nick>
Status: RESOLVED FIXED QA Contact: Katrin Fischer <katrin.fischer>
Severity: normal    
Priority: P5 - low CC: arthur.suzuki, lucas, wainuiwitikapark
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.11.00, 22.05.08, 21.11.15
Attachments: Bug 31595: Don't process extended attributes if none are inlcuded in the file
Bug 31595: Don't process extended attributes if none are inlcuded in the file
Bug 31595: Don't process extended attributes if none are inlcuded in the file

Description Nick Clemens (kidclamp) 2022-09-21 16:10:10 UTC
We spend time getting /deleting/updating extended attributes even if they are not included in the file
Comment 1 Nick Clemens (kidclamp) 2022-09-21 16:12:37 UTC
Created attachment 140824 [details] [review]
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
Comment 2 Chris Cormack 2022-09-22 01:12:35 UTC
Created attachment 140840 [details] [review]
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>
Comment 3 Katrin Fischer 2022-10-08 10:17:39 UTC
Created attachment 141539 [details] [review]
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>
Comment 4 Tomás Cohen Arazi 2022-10-14 19:05:46 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!
Comment 5 Lucas Gass 2022-12-05 20:17:07 UTC
Backported to 22.05.x for upcoming 22.05.08
Comment 6 Arthur Suzuki 2022-12-16 13:26:17 UTC
applied to 21.11 for 21.11.15
Comment 7 wainuiwitikapark 2023-03-15 00:55:59 UTC
Not backported to 21.05.x