Koha/tools
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
..
csv-profiles
quotes Bug 9010 - Follou up Quote of the day: Umlauts do not display correctly 2012-11-09 20:02:11 -05:00
ajax-inventory.pl Bug 7684: QA Followup and bugfixes 2013-11-01 00:11:45 +00:00
background-job-progress.pl
batch_records_ajax.pl Bug 10558 [QA Follow-up] 2014-03-10 15:48:32 +00:00
batchMod.pl Bug 11343: The max number of items to process in a batch is hardcoded 2014-03-10 19:10:27 +00:00
cleanborrowers.pl Bug 6506: When AnonymousPatron not set, deletion of issue history silently failed. 2013-05-01 08:44:11 -04:00
copy-holidays.pl
csv-profiles.pl Bug 10853 - followup to correct tabs 2013-10-11 02:16:17 +00:00
exceptionHolidays.pl Bug 7351 : feature that allows to delete a range of dates 2012-09-28 12:19:45 +02:00
export.pl Bug 10277 - Add C4::Context->IsSuperLibrarian() 2013-12-30 15:47:23 +00:00
holidays.pl Bug 10277 - Add C4::Context->IsSuperLibrarian() 2013-12-30 15:47:23 +00:00
import_borrowers.pl Bug 10861: Add a check on cardnumber length 2014-03-12 02:16:18 +00:00
inventory.pl Bug 7684: (follow-up) fix UTF-8 encoding problems in CSV export 2013-11-01 00:25:08 +00:00
koha-news.pl Bug 9108: Followup: send the dateformat value from C4::Auth 2013-01-17 21:59:30 -05:00
letter.pl Bug 10080 - Change system pref IndependantBranches to IndependentBranches 2013-05-22 07:58:23 -07:00
manage-marc-import.pl Bug 10558 [QA Follow-up] 2014-03-10 15:48:32 +00:00
marc_modification_templates.pl Bug 8015: QA Followup 2 2013-10-31 22:50:48 +00:00
modborrowers.pl Bug 2720 - Overdues which debar automatically should undebar automatically when returned 2013-10-31 01:53:22 +00:00
newHolidays.pl Bug 8842 fix Plack scoping for holidays 2012-11-05 08:41:17 -05:00
overduerules.pl Bug 8904: fix Plack scoping for overduerules.pl 2012-11-04 19:58:33 -05:00
picture-upload.pl Bug 10636 - patronimage should have borrowernumber as PK, not cardnumber 2013-10-14 21:08:02 +00:00
quotes-upload.pl
quotes.pl
scheduler.pl Bug 9108: Followup: send the dateformat value from C4::Auth 2013-01-17 21:59:30 -05:00
stage-marc-import.pl Bug 8015: (follow-up) move from the Koha to the C4 namespace 2013-10-31 22:48:20 +00:00
tools-home.pl
upload-cover-image.pl Bug 11473 - add 'biblio' and 'item' to cataloguing logging info 2014-01-17 05:42:44 +00:00
upload-file-progress.pl
upload-file.pl
viewlog.pl Bug 11477 - Add names for librarian and borrowers in the logs 2014-01-17 06:06:53 +00:00