1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>Koha › Cataloging › Import Patrons <!-- TMPL_IF NAME="uploadborrowers" -->› Results<!-- /TMPL_IF --></title>
3 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
4 <style type="text/css">
5 .yui-u fieldset.rows label.widelabel { width: 12em; }
6 .line_error { width: 100%; }
7 code { background-color: yellow; }
11 <!-- TMPL_INCLUDE NAME="header.inc" -->
12 <!-- TMPL_INCLUDE NAME="patron-search.inc"-->
14 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> › <a href="/cgi-bin/koha/tools/import_borrowers.pl">Import Patrons</a><!-- TMPL_IF name="uploadborrowers" --> › Results<!-- /TMPL_IF --></div>
16 <div id="doc3" class="yui-t2">
21 <div class="yui-u first">
22 <h1>Import Patrons</h1>
23 <!-- TMPL_IF name="uploadborrowers" -->
24 <h5>Import results :</h5>
26 <li><!-- TMPL_VAR name="imported" --> imported records <!-- TMPL_IF name="lastimported" -->(last was <!-- TMPL_VAR name="lastimported" -->)<!-- /TMPL_IF --></li>
27 <li><!-- TMPL_VAR name="overwritten" --> overwritten <!-- TMPL_IF name="lastoverwritten" -->(last was <!-- TMPL_VAR name="lastoverwritten" -->)<!-- /TMPL_IF --></li>
28 <li><!-- TMPL_VAR name="alreadyindb" --> not imported because already in borrowers table and overwrite disabled <!-- TMPL_IF name="lastalreadyindb" -->(last was <!-- TMPL_VAR name="lastalreadyindb" -->)<!-- /TMPL_IF --></li>
29 <li><!-- TMPL_VAR name="invalid" --> not imported because they are not in the expected format <!-- TMPL_IF name="lastinvalid" -->(last was <!-- TMPL_VAR name="lastinvalid" -->)<!-- /TMPL_IF --></li>
30 <li><!-- TMPL_VAR name="total" --> records parsed</li>
31 <li><a href="/cgi-bin/koha/tools/tools-home.pl">Back to Tools</a></li>
33 <!-- TMPL_IF NAME="FEEDBACK" -->
38 <!-- TMPL_LOOP NAME="FEEDBACK" -->
40 <!-- TMPL_IF NAME="filename" -->Parsing upload file <span class="filename"><!-- TMPL_VAR NAME="filename" --></span>
41 <!-- TMPL_ELSIF NAME="backend" -->Upload parsed using <!-- TMPL_VAR NAME="backend" -->
42 <!-- TMPL_ELSIF NAME="headerrow" -->These fields found: <!-- TMPL_VAR NAME="value" -->
43 <!-- TMPL_ELSE --><!-- TMPL_VAR NAME="name" --> : <!-- TMPL_VAR NAME="value" -->
50 <!-- TMPL_IF NAME="ERRORS" -->
53 <h5>Error analysis:</h5>
55 <!-- TMPL_LOOP NAME="ERRORS" -->
56 <!-- TMPL_IF NAME="badheader" --><li>Header row could not be parsed</li><!-- /TMPL_IF -->
57 <!-- TMPL_LOOP NAME="missing_criticals" -->
58 <li class="line_error">
59 Line <span class="linenumber"><!-- TMPL_VAR NAME="line" --></span>
60 <!-- TMPL_IF NAME="badparse" -->
62 <!-- TMPL_ELSIF NAME="bad_date" -->
63 has "<!-- TMPL_VAR NAME="key" -->" in unrecognized format: "<!-- TMPL_VAR NAME="value" -->"
65 Critical field "<!-- TMPL_VAR NAME="key" -->"
66 <!-- TMPL_IF NAME="branch_map" -->has unrecognized value "<!-- TMPL_VAR NAME="value" -->"
67 <!-- TMPL_ELSIF NAME="category_map" -->has unrecognized value "<!-- TMPL_VAR NAME="value" -->"
68 <!-- TMPL_ELSE -->missing
70 (borrowernumber: <!-- TMPL_VAR NAME="borrowernumber" -->; surname: <!-- TMPL_VAR NAME="surname" -->).
72 <br /><code><!-- TMPL_VAR NAME="lineraw" --></code>
81 <li>Select a file to import into the borrowers table</li>
82 <li>If a cardnumber exists in the table, you can choose whether to ignore the new one or overwrite the old one.</li>
84 <form method="post" action="<!-- TMPL_VAR name="SCRIPT_NAME" -->" enctype="multipart/form-data">
85 <fieldset class="rows">
86 <legend>Import into the borrowers table</legend>
89 <label for="uploadborrowers">Select the file to import: </label>
90 <input type="file" id="uploadborrowers" name="uploadborrowers" />
93 <fieldset class="rows">
94 <legend>Field to use for record matching</legend>
97 <select name="matchpoint" id="matchpoint">
98 <option value="cardnumber">Cardnumber</option>
99 <!-- TMPL_LOOP NAME="matchpoints" -->
100 <option value="<!-- TMPL_VAR NAME="code" -->"><!-- TMPL_VAR NAME="description" --></option>
106 <fieldset class="rows">
107 <legend>Default values</legend>
109 <!-- TMPL_LOOP NAME="columnkeys" -->
111 <label class="widelabel" for="<!-- TMPL_VAR NAME="key" -->"><!-- TMPL_VAR NAME="key" --></label>
112 <input id="<!-- TMPL_VAR NAME="key" -->" name="<!-- TMPL_VAR NAME="key" -->" />
116 <fieldset class="rows">
117 <legend>If matching record is already in the borrowers table:</legend>
118 <ol><li class="radio">
119 <input type="radio" id="overwrite_cardnumberno" name="overwrite_cardnumber" value="0" checked="checked" /><label for="overwrite_cardnumberno">Ignore this one, keep the existing one</label>
122 <input type="radio" id="overwrite_cardnumberyes" name="overwrite_cardnumber" value="1" /><label for="overwrite_cardnumberyes">Overwrite the existing one with this</label>
126 <!-- TMPL_IF NAME="ExtendedPatronAttributes" -->
127 <fieldset class="rows">
128 <legend>Extended Attributes</legend>
129 <ol><li class="radio">
130 <input type="radio" id="ext_preserve_0" name="ext_preserve" value="0" checked="checked" /><label for="ext_preserve_0">Replace all Extended Attributes</label>
133 <input type="radio" id="ext_preserve_1" name="ext_preserve" value="1" /><label for="ext_preserve_1">Replace only included Extended Attributes</label>
138 <fieldset class="action"><input type="submit" value="Import" /></fieldset>
145 <li><b>Download a starter CSV file with all the columns <a href="?sample=1">here</a>.</b> Values are comma-separated.</li>
146 <li>OR format your file in CSV format with the following fields:</li>
148 <!-- TMPL_LOOP name="columnkeys" -->'<!-- TMPL_VAR name="key" -->', <!-- /TMPL_LOOP -->
151 <!-- TMPL_IF NAME="ExtendedPatronAttributes" -->
152 <li>If loading patron attributes, the 'patron_attributes' field should contain a comma-separated list of attribute types
153 and values. The attribute type code and a ':' should precede each value. For example: "INSTID:12345,LANG:fr". This
154 means that if an input record has more than one attribute, the 'patron_attributes' field must be wrapped in double quotation marks.
157 <li>The fields 'branchcode' and 'categorycode' are <b>required</b> and <b>must match</b> valid entries in your database.</li>
158 <li>'password' should be stored in plaintext, and will be converted to a md5 hash (if your passwords are already encrypted, talk to your systems administrator about options).</li>
159 <li>Date formats should match your system preference, and <b>must</b> be zero-padded, e.g. '01/02/2008'.</li>
160 <li>You may optionally include a header row, defining which columns you are supplying in the import file.</li>
167 <div class="yui-b noprint">
168 <!-- TMPL_INCLUDE NAME="tools-menu.inc" -->
171 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->