]> git.evergreen-ils.org Git - working/Evergreen.git/commit
Fix LP 797304 and 797307 - asset.uri parsing bugs
authorDan Scott <dan@coffeecode.net>
Tue, 14 Jun 2011 18:02:49 +0000 (14:02 -0400)
committerDan Scott <dan@coffeecode.net>
Tue, 14 Jun 2011 18:02:49 +0000 (14:02 -0400)
commite79a805299ec734a29ee5bfa77dc74bc1fd208cd
tree6d324f347cc94164ece71e3a42e518092467a5b5
parent0c2d1a7a9bbeaa368a431ffc94e63dbb9e36592c
Fix LP 797304 and 797307 - asset.uri parsing bugs

Per 797304: one would expect asset.uri.label to be populated with the
value of 856 $y, however, it was getting populated with 856 $u - perhaps
as a result of the ordering of array entries in XPATH() not matching the
XPath expression. Instead of including 856 $u in the XPath expression
for uri_label, just assign its value to uri_label if uri_label is
otherwise NULL.

Per 797307: biblio.extract_located_uris() tries to reuse an existing
active asset.uri entry rather than create a new row; however, it does
not handle the case where there is no public note aka "use restriction"
and will end up creating a duplicate row every time the record is
reingested. Teach it to handle NULL values properly.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Open-ILS/src/sql/Pg/030.schema.metabib.sql