[% USE raw %]
[% USE Asset %]
[% USE Koha %]
[% USE Branches %]
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
[% IF ( uploadborrowers ) %]
Results › [% END %]
Import patrons › Tools › Koha
[% INCLUDE 'doc-head-close.inc' %]
[% INCLUDE 'header.inc' %]
[% INCLUDE 'patron-search.inc' %]
[% INCLUDE 'blocking_errors.inc' %]
Import patrons
[% IF ( uploadborrowers ) %]
Import results :
[% imported | html %] imported records [% IF ( lastimported ) %](last was [% lastimported | html %])[% END %]
[% IF imported and patronlistname %]
Patronlist with imported patrons: [% patronlistname | html %]
[% END %]
[% overwritten | html %] overwritten [% IF ( lastoverwritten ) %](last was [% lastoverwritten | html %])[% END %]
[% alreadyindb | html %] not imported because already in borrowers table and overwrite disabled [% IF ( lastalreadyindb ) %](last was [% lastalreadyindb | html %])[% END %]
[% invalid | html %] not imported because they are not in the expected format [% IF ( lastinvalid ) %](last was [% lastinvalid | html %])[% END %]
[% IF ( f.filename ) %]
Parsing upload file [% f.filename | html %]
[% ELSIF ( f.backend ) %]
Upload parsed using [% f.backend | html %]
[% ELSIF ( f.headerrow ) %]
These fields found: [% f.value | html %]
[% ELSIF ( f.already_in_db ) %]
Patron already in database: [% f.value | html %]
[% ELSE %]
[% f.name | html %] : [% f.value | html %]
[% END %]
[% END %]
[% END %]
[% IF ( errors ) %]
Error analysis:
[% FOREACH e IN errors %]
[% IF ( e.badheader ) %]
Header row could not be parsed
[% END %]
[% FOREACH missing_critical IN e.missing_criticals %]
Line [% missing_critical.line | html %]
[% IF ( missing_critical.badparse ) %]
could not be parsed!
[% ELSIF ( missing_critical.bad_date ) %]
has "[% missing_critical.key | html %]" in unrecognized format: "[% missing_critical.value | html %]"
[% ELSE %]
Critical field "[% missing_critical.key | html %]"
[% IF ( missing_critical.branch_map ) %]
has unrecognized value "[% missing_critical.value | html %]"
[% ELSIF ( missing_critical.category_map ) %]
has unrecognized value "[% missing_critical.value | html %]"
[% ELSE %]
missing
[% END %]
(borrowernumber: [% missing_critical.borrowernumber | html %]; surname: [% missing_critical.surname | html %]).
[% END %]
[% missing_critical.lineraw | html %]
[% END %]
[% IF e.invalid_cardnumber %]
Cardnumber [% e.cardnumber | html %] is not a valid cardnumber
[% IF e.borrowernumber %] (for patron with borrowernumber [% e.borrowernumber | html %])[% END %]
[% END %]
[% IF e.duplicate_userid %]
Userid [% e.userid | html %] is already used by another patron.
[% END %]
[% IF e.passwd_too_short %]
Password is too short for patron with borrowernumber [% e.borrowernumber | html %]. Minimum length is [% e.min_length | html %], length is [% e.length | html %]
[% END %]
[% IF e.passwd_whitespace %]
Password contains whitespace for patron with borrowernumber [% e.borrowernumber | html %].
[% END %]
[% IF e.passwd_too_weak %]
Password is too weak for patron with borrowernumber [% e.borrowernumber | html %].
[% END %]
[% IF e.passwd_plugin_err %]
Password plugin error for patron with borrowernumber [% e.borrowernumber | html %].
[% END %]
[% IF e.passwd_unknown_err %]
Password error for patron with borrowernumber [% e.borrowernumber | html %].
[% END %]
[% END %]
[% END %]
[% ELSE %]
Select a file to import into the borrowers table
If a cardnumber exists in the table, you can choose whether to ignore the new one or overwrite the old one.
[% END %]
Notes:
The first line in the file must be a header row defining which columns you are supplying in the import file.
Download a Starter CSV file with all the columns. Values are comma-separated.
OR choose which fields you want to supply from the following list:
[% FOREACH columnkey IN borrower_fields %]'[% columnkey.field | html %]', [% END %]
[% IF ( Koha.Preference('ExtendedPatronAttributes') ) %]
If loading patron attributes, the 'patron_attributes' field should contain a comma-separated list of attribute types and values. The attribute type code and a colon should precede each value. For example: INSTID:12345,LANG:fr or STARTDATE:January 1 2010,TRACK:Day. If an input record has more than one attribute, the fields should either be entered as an unquoted string (previous examples), or with each field wrapped in separate double quotes and delimited by a comma: "STARTDATE:January 1, 2010","TRACK:Day". The second syntax would be required if the data might have a comma in it, like a date string.
[% END %]
Required fields: The fields 'surname', 'branchcode', and 'categorycode' are required and 'branchcode' and 'categorycode' must match valid entries in your database.
'password' should be stored in plaintext, and will be converted to a Bcrypt hash (if your passwords are already encrypted, talk to your system administrator about options). Passwords will not be updated on overwrite unless replace passwords option is checked.
Date formats should match your system preference, and must be zero-padded, e.g. '01/02/2008'. Alternatively,
you can supply dates in ISO format (e.g., '2010-10-28').
[% MACRO jsinclude BLOCK %]
[% INCLUDE 'calendar.inc' %]
[% Asset.js("js/tools-menu.js") | $raw %]
[% INCLUDE 'str/members-menu.inc' %]
[% Asset.js("js/members-menu.js") | $raw %]
[% END %]
[% INCLUDE 'intranet-bottom.inc' %]