[open-ils-commits] ***SPAM*** [GIT] Evergreen ILS branch master updated. cd9dfdfa8293431754fe93d49b6a50904eedba3c
Evergreen Git
git at git.evergreen-ils.org
Tue Dec 16 15:37:13 EST 2014
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".
The branch, master has been updated
via cd9dfdfa8293431754fe93d49b6a50904eedba3c (commit)
from 32f7523f5f527316ef62d5ec700c6a9115bc3151 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit cd9dfdfa8293431754fe93d49b6a50904eedba3c
Author: Dan Scott <dscott at laurentian.ca>
Date: Mon Dec 15 23:23:49 2014 -0500
LP#1402905 Use stricter matching for UPC values
Per http://www.loc.gov/marc/bibliographic/bd024.html we
should be checking to see if either the ind1 is "1" or
if there's a subfield 2 with a value of "upc" before
assuming that any "Other standard identifier" 024 field
is a UPC value.
Signed-off-by: Dan Scott <dscott at laurentian.ca>
Signed-off-by: Ben Shum <bshum at biblio.org>
diff --git a/Open-ILS/src/templates/opac/parts/misc_util.tt2 b/Open-ILS/src/templates/opac/parts/misc_util.tt2
index 32717b8..da7c958 100644
--- a/Open-ILS/src/templates/opac/parts/misc_util.tt2
+++ b/Open-ILS/src/templates/opac/parts/misc_util.tt2
@@ -137,10 +137,17 @@
args.isbns.push(isbn.textContent);
END;
+ # UPCs can be identified either by ind1="1" or subfield 2 of "upc"
args.upcs = [];
- FOR upc IN xml.findnodes('//*[@tag="024"]/*[@code="a"]');
+ FOR upc IN xml.findnodes('//*[@tag="024" and @ind="1"]/*[@code="a"]');
args.upcs.push(upc.textContent);
END;
+ FOR upcfield IN xml.findnodes('//*[@tag="024"]/*[@code="2" and text()="upc"]');
+ my_parent = upcfield.parentNode();
+ FOR upc IN my_parent.findnodes('./*[@code="a"]');
+ args.upcs.push(upc.textContent);
+ END;
+ END;
args.upc = args.upcs.0; # use first UPC as the default
args.issns = [];
-----------------------------------------------------------------------
Summary of changes:
Open-ILS/src/templates/opac/parts/misc_util.tt2 | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list