Koha-clms/installer/data/mysql
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
..
atomicupdate Bug 7475: Update configuration 2012-09-19 17:15:25 +02:00
de-DE Bug 11260: (follow-up) repair German sample_z3950_servers.sql 2014-01-08 01:12:41 +00:00
en Bug 11731 - Fixed typo in message_transport_types.txt file. 2014-03-11 14:20:32 +00:00
es-ES Bug 10863: Add 2 circulation permissions: force_checkout and lift_restriction 2014-01-07 03:59:53 +00:00
fr-FR Bug 11628: add missing staffaccess permission to French userflags.sql file 2014-02-18 20:43:31 +00:00
it-IT Bug 10863: Add 2 circulation permissions: force_checkout and lift_restriction 2014-01-07 03:59:53 +00:00
nb-NO Bug 10863: Add 2 circulation permissions: force_checkout and lift_restriction 2014-01-07 03:59:53 +00:00
pl-PL Bug 10863: Add 2 circulation permissions: force_checkout and lift_restriction 2014-01-07 03:59:53 +00:00
ru-RU Bug 10863: Add 2 circulation permissions: force_checkout and lift_restriction 2014-01-07 03:59:53 +00:00
uk-UA Bug 10863: Add 2 circulation permissions: force_checkout and lift_restriction 2014-01-07 03:59:53 +00:00
backfill_statistics.pl Bug 5370: Fix all the references to koha.org 2010-11-08 09:41:49 +13:00
kohastructure.sql Bug 3445: add more indexes on the action_logs table 2014-03-10 21:12:04 +00:00
labels_upgrade.pl Bug 2505 - Add commented use warnings where missing in the installer/ directory 2010-04-21 20:26:28 +12:00
patroncards_upgrade.pl Bug 2505 - Add commented use warnings where missing in the installer/ directory 2010-04-21 20:26:28 +12:00
sample_only_param_tables.sql Moved location of updater scripts to dbms specific dir. 2007-11-13 11:22:47 -06:00
sysprefs.sql Bug 11751: remove dead code related to handling members of institution patrons 2014-03-11 15:05:14 +00:00
update22to30.pl Bug 11398: A typo occurred with occured 2014-01-02 15:12:48 +00:00
updatedatabase.pl Bug 10861: Add a check on cardnumber length 2014-03-12 02:16:18 +00:00