[Koha-bugs] [Bug 906] ISBN Check

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Mar 15 20:22:05 CET 2013


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

--- Comment #3 from Tomás Cohen Arazi <tomascohen at gmail.com> ---
Created attachment 16169
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=16169&action=edit
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+

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


More information about the Koha-bugs mailing list