[Koha-bugs] [Bug 10861] Add a check on cardnumber length

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Dec 16 10:17:33 CET 2013


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10861

M. de Rooy <m.de.rooy at rijksmuseum.nl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #23387|0                           |1
        is obsolete|                            |
  Attachment #23388|0                           |1
        is obsolete|                            |
  Attachment #23476|0                           |1
        is obsolete|                            |
  Attachment #23477|0                           |1
        is obsolete|                            |

--- Comment #20 from M. de Rooy <m.de.rooy at rijksmuseum.nl> ---
Created attachment 23563
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=23563&action=edit
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 at rijksmuseum.nl>
Tested adding, updating; importing and ran unit test.
Preliminary QA comments on Bugzilla

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list