Koha/koha-tmpl/intranet-tmpl/prog/en/modules
Jonathan Druart 834abff631 Bug 10861: Add a check on cardnumber length
Some libraries would like to add a check on the cardnumber length.
This patch adds the ability to restrict the cardnumber to a specific
length (strictly equal to XX, or length > XX or min < length < max).
This restriction is checked on inserting/updating a patron or on importing
patrons.

This patch adds:
- 1 new syspref CardnumberLength. 2 formats: a number or a range
  (xx,yy).

- 1 new unit test file t/Members/checkcardnumber.t for the
C4::Members::checkcardnumber routine.

Test plan:
1/ Fill the pref CardnumberLength with '5,8'
2/ Create a new patron with an invalid cardnumber (123456789)
3/ Check that you cannot save
4/ With Firebug, replace the pattern attribute value (for the cardnumber
input) with ".{5,10}"
5/ You are allowed to save but an error occurred.
6/ Try the same steps for update.
7/ Go to the import borrowers tool.
8/ Play with the import borrowers tool. We must test add/update patrons
and the "record matching" field (cardnumber or a uniq patron attribute)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested adding, updating; importing and ran unit test.
Preliminary QA comments on Bugzilla

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-03-12 02:16:18 +00:00
..
acqui Bug 11170: (follow-up) fix typo 'occured' in parcels.tt 2014-03-11 15:10:35 +00:00
admin Bug 10861: Add a check on cardnumber length 2014-03-12 02:16:18 +00:00
authorities Bug 10691: use authority ID in see-also links in authority search results (staff) 2014-01-16 22:35:58 +00:00
basket
batch Bug 9210: wrap long lines in printed hold notices 2014-01-15 15:51:44 +00:00
catalogue Bug 11328 - Show local cover images in staff client search results 2014-03-10 15:16:06 +00:00
cataloguing Bug 11710 - Use new DataTables include in cataloging Z39.50 search template 2014-02-27 15:34:12 +00:00
circ Bug 11359: Add the borrower's cardnumber and phonenumber to the branch overdues report 2014-03-10 20:25:26 +00:00
course_reserves Bug 11605: fallback to default DataTables settings where possible 2014-03-10 19:05:51 +00:00
errors
help Bug 7372: (follow-up) remove last traces of roadtype table and admin pages 2014-02-21 16:11:28 +00:00
installer
labels Bug 11716 - Use new DataTables include in label manage template 2014-02-27 15:38:58 +00:00
members Bug 10861: Add a check on cardnumber length 2014-03-12 02:16:18 +00:00
offline_circ
patron_lists Bug 11670 - Remove sorting from patron lists action columns 2014-02-10 15:59:27 +00:00
patroncards
plugins
reports Bug 11605: fallback to default DataTables settings where possible 2014-03-10 19:05:51 +00:00
reserve Bug 11649 - Always use words "copy number" - intranet 2014-02-18 23:51:24 +00:00
reviews
rotating_collections
serials Bug 10837: make it possible to export serial claims as CSV even when no notice defined 2014-03-11 16:49:44 +00:00
services
sms
suggestion Bug 11605: fallback to default DataTables settings where possible 2014-03-10 19:05:51 +00:00
tags Bug 11605: fallback to default DataTables settings where possible 2014-03-10 19:05:51 +00:00
test
tools Bug 10861: Add a check on cardnumber length 2014-03-12 02:16:18 +00:00
virtualshelves Bug 11789 - Use validation plugin when creating new list 2014-02-21 20:14:00 +00:00
z3950
about.tt Bug 11772: (follow-up) make warning about no active currency a link to currency setup page 2014-02-18 20:59:56 +00:00
auth.tt
intranet-main.tt