UPC search in misc_util.tt2 is too broad

Bug #1402905 reported by Dan Scott
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Undecided
Unassigned
2.6
Fix Released
Undecided
Unassigned

Bug Description

* Evergreen master (all the way back to the beginning of TPAC time)

misc_util.tt2 currently searches for UPC codes like so:

        args.upcs = [];
        FOR upc IN xml.findnodes('//*[@tag="024"]/*[@code="a"]');
            args.upcs.push(upc.textContent);
        END;
        args.upc = args.upcs.0; # use first UPC as the default

However, the 024 field can actually be used for many, many different other standard identifiers, as documented at http://www.loc.gov/marc/bibliographic/bd024.html

The search for UPCs should look for either a first indicator of "1" or a subfield 2 with a value of "upc" (per http://www.loc.gov/standards/sourcelist/standard-identifier.html) to avoid false positives.

Tags: pullrequest
Revision history for this message
Dan Scott (denials) wrote :

http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/dbs/lp1402905_stricter_upc is a simple attempt to address this issue. Still needs testing before I'm going to tag this as a pull request.

Changed in evergreen:
milestone: none → 2.7.2
Revision history for this message
Dan Scott (denials) wrote :

Tested and I'm happy with it. Added a pullrequest tag.

tags: added: pullrequest
Revision history for this message
Ben Shum (bshum) wrote :

Seems like a logical fix to me. Pushed to master and backported to rel_2_7 and rel_2_6.

Changed in evergreen:
status: New → Fix Committed
Galen Charlton (gmc)
Changed in evergreen:
status: Fix Committed → Fix Released
Dan Scott (denials)
no longer affects: evergreen/2.8
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.