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
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.
Created attachment 171437 [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
(In reply to Katrin Fischer from comment #2) > 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. I still think this to be true as we'd want to match the script as closely to what the GUI can as possible. Also we already have the "default" option that takes a list of fields. It would be more consistent.