Bug 35061 - Add support to preserve patron category code when importing patrons with commandline script
Summary: Add support to preserve patron category code when importing patrons with comm...
Status: Needs Signoff
Alias: None
Product: Koha
Classification: Unclassified
Component: Command-line Utilities (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Aleisha Amohia
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-16 00:55 UTC by Aleisha Amohia
Modified: 2023-10-16 19:50 UTC (History)
1 user (show)

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


Attachments
Bug 35061: Preserve categorycode when importing patrons (3.38 KB, patch)
2023-10-16 01:00 UTC, Aleisha Amohia
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Aleisha Amohia 2023-10-16 00:55:39 UTC

    
Comment 1 Aleisha Amohia 2023-10-16 01:00:47 UTC
Created attachment 157180 [details] [review]
Bug 35061: Preserve categorycode when importing patrons

This patch should preserve category codes when importing patrons using misc/import_patrons.pl

Use case:

/usr/share/koha/bin/import_patrons.pl --file patrons.csv  --matchpoint userid --default branchcode=C --overwrite --preserve-categorycode --verbose --confirm

To test, use a file with a column categorycode. Confirm that new patrons added from the spreadsheet by the file are added to the database with the correct category code. Confirm existing patrons that are overwritten receive the categorycode from the spreadsheet.

Sponsored-by: Auckland University of Technology
Comment 2 Katrin Fischer 2023-10-16 19:50:53 UTC
The GUI already allows to write-protect any field of the patron record. I think this would be much more consistent and useful, if we had a parameter instead that allowed to pass a list of borrowers fields.