[OPEN-ILS-DEV] Business::ISBN Patch for public.translateisbn1013()
Jason Stephenson
jstephenson at mvlc.org
Mon Aug 2 09:01:54 EDT 2010
Hi, all.
Attached is a patch that replaces the body of
public.translateisbn1013() in 002.schema.config.sql with a PLPERLU
function that uses Business::ISBN as was discussed in IRC on Friday.
I have tested it with two batches with a total of 19,999 bib records
that failed previously with the old version of the function. This new
version does not throw an error when an input ISBN is invalid, it
simply does not try to translate the ISBN to the other format and
returns the input as the output.
Some notes about the implementation:
1. It tries to mimic the output of the previous function
implementation exactly. It will in all cases except where the input
ISBN contains dashes. The old implementation would have simply output
the input in that case. The new implementation parses the ISBN and
returns the input with the translated ISBN tacked on the the end.
(From the code, I believe that this was the intent of the original
implementation. Plus, it is not likely to encounter that situation
since ISBNs have dashes stripped when stored in MARC.)
2. It works with ISBN13s that cannot be converted to ISBN10. In that
case, it simply returns the input because the translation failed.
3. Finally, it obviously adds a requirement for the Business::ISBN
Perl module to Evergreen (at least the database portion).
You will also find a DCO attached.
Cheers,
Jason Stephenson
Merrimack Valley Library Consortium
-------------- next part --------------
A non-text attachment was scrubbed...
Name: business-isbn.patch
Type: text/x-patch
Size: 1175 bytes
Desc: not available
Url : http://libmail.georgialibraries.org/pipermail/open-ils-dev/attachments/20100802/a4b9518c/attachment.bin
-------------- next part --------------
Developer's Certificate of Origin 1.1
By making a contribution to this project, I certify that:
(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or
(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or
(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.
(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.
Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
More information about the Open-ils-dev
mailing list