the fields listed in plain text on the patron import tool do not match those in the csv - the csv is correct, the text is wrong.
turns out this is not a simple template change it's a perl script that I don't understand (yet). Reassigning to the default assignee.
Created attachment 2801 [details] [review] Proposed Patch The two columns missing from the list that appear in the example CSV file are borrowernumber and cardnumber. The list is generated in import_borrowers.pl, but there is code that actually removes these two columns from the list. my $columnkeystpl = [ map { {'key' => $_} } grep {$_ ne 'borrowernumber' && $_ ne 'cardnumber'} @columnkeys ]; # ref. to array of hashrefs. This same list is used to create the form which is used to enter the default values on the Patron Import page. The proposed patch adds cardnumber to the template page and fixes the loop so that there is not a dangling comma at the end of the list. I did not add borrowernumber because it is an auto-incremented value in the borrower table. Adding a borrowernumber to a CSV file for import does nothing as far as I can tell.
Created attachment 2862 [details] [review] signed off patch
Patch pushed please test
Comment from Chris N "I was just doing a bit of cherry-picking for 3.2.x and noticed this patch which has been committed to HEAD. This is not the correct way to fix this "bug." Cardnumber is one of two fields stripped by line 64 in tools/import_borrowers.pl. If it is desirable to include 'cardnumber' in the field list, it should be removed from the grep in the underlying script at the above mentioned line. Doing this at the template level just results in an unnecessary remove and re-addition" I have reverted the patch
This bug is mentioned in: Bug 5373: Adds cardnumber to the field list of the Import Patrons NOTES. http://lists.koha-community.org/pipermail/koha-patches/2010-December/013191.html Bug 5373: Adds cardnumber to the field list of the Import Patrons NOTES. http://lists.koha-community.org/pipermail/koha-patches/2010-December/013420.html Bug 5373: Adds cardnumber to the field list of the Import Patrons NOTES. http://lists.koha-community.org/pipermail/koha-patches/2010-December/013377.html
Created attachment 6385 [details] [review] Bug 5373 - allow 'cardnumber' to appear on the patron import field list For some reason, it was explicitly removed, however you need it if you want to match up on cardnumber.
Note: The online help file for the patron import page also lists borrowernumber: borrowernumber, cardnumber, surname, firstname...
Created attachment 7749 [details] [review] [SIGNED-OFF] Bug 5373 - allow 'cardnumber' to appear on the patron import field list For some reason, it was explicitly removed, however you need it if you want to match up on cardnumber. Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Easy to test and works nicely. Before patch cardnumber is not shown in the list of fields on the patron import page. After applying the patch it is.
QA comment: tiny patch, passed QA
wow, git blame says: e3fa9f2d (Ryan Higgins 2008-08-09 15:27:27 -0500 65) my $columnkeystpl = [ map { {'key' => $_} } grep {$_ ne 'bor... was here for a very long time (3.5 years !!!)
This patch will be included in the forthcoming 3.6.5 release (no string changes).