Bug 26343 - Blank columns in patron import CSV clears existing data when overwriting
Summary: Blank columns in patron import CSV clears existing data when overwriting
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Tools (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-01 15:19 UTC by Donna
Modified: 2023-09-22 20:57 UTC (History)
0 users

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Donna 2020-09-01 15:19:21 UTC
When importing/overlaying patrons, if you have any blank columns in the csv, any existing data in a patron record is cleared.  

There should be an option as to whether or not you intend to clear the data using blank columns or not.

To recreate:
1. Create patron with several items of data, such as address, city, phone.
2. Create a csv with username, address, and a blank column for phone
3. Import patron file, using the overwrite function
4. See that the phone info is now blank in the patron record.
Comment 1 Katrin Fischer 2020-10-19 16:42:27 UTC
I think this would be more suitable as an enhancement. 

The current behaviour that an empty cells means "reset" I think is ok and needed that way. But maybe we could add a checkbox to the list of default options saying to keep the existing value when empty in import?
Comment 2 Katrin Fischer 2022-10-17 21:18:27 UTC
Re-reading this again, I believe the bug description doesn't quite fit. I think the described behaviour is correct, because we need a way to reset/empty out fields. If the other behavior is still desirable, we should change it to read more as an alternative. But I can't come up with something right now :(
Comment 3 Katrin Fischer 2023-09-22 20:57:11 UTC
We do now have the option to select fields in the patron record that will be protected from being overwritten:

"Selected fields will be preserved from original patron record when overwriting existing patron."