[Koha-bugs] [Bug 906] ISBN Check
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Sat Mar 16 16:54:56 CET 2013
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=906
Bernardo Gonzalez Kriegel <bgkriegel at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #16170|0 |1
is obsolete| |
--- Comment #5 from Bernardo Gonzalez Kriegel <bgkriegel at gmail.com> ---
Created attachment 16178
-->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=16178&action=edit
[SIGNED-OFF] Bug 906 - ISBN Check
In the MARC editor, have the ISBN checked. This feature is syspref-driven [1].
The patch adds the following javascript functions to cataloguing/addbiblio.tt:
- _NormalizeISBN (for sanitizing the ISBN before algorithm checking)
- _CheckISBNChecksum10 (for validating the checksum digit)
- _CheckISBNChecksum13 (idem)
- IsISBNOk (extract the isbn from the corresponding field, call the proper
checker functions, return the string message)
The Check function was hooked to call IsISBNOk and build a proper message
dialog. AreMandatoriesNotOk got its message string rearranged too.
To test:
- Apply the patch, run updatedatabase.pl so the new syspref gets included on
the DB.
- Try adding a record: no matter what you introduce on the corresponding ISBN
field Koha will behave as usual.
- Go to the Sysprefs editor, under 'Cataloguing' set RequireValidISBN to
'Require'.
- Reload your marc editor
- Try different ISBN to see how it behaves:
-- test cases --
* Empty ISBN should not stop you from saving your record.
* Valid ISBN idem [2].
* Wrong ISBN should make Koha warn you and ask you to fix it [3].
[1] Added RequireValidISBN syspref.
[2] Valid ISBN10: 291409891X
ISBN13: 9784873113685
[3] Try To+
Sponsored-by: Universidad Nacional de Córdoba
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel at gmail.com>
Comment: Work as described. No errors.
Tested with 10 and 13 ISBN, and random string.
Suggestion: If problem is in check digit, could suggest
correct value?
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list