LP#790329 org_lasso search is broken user/dbs/lp790329_2_0
authorDan Scott <dan@coffeecode.net>
Mon, 15 Aug 2011 17:42:55 +0000 (13:42 -0400)
committerDan Scott <dan@coffeecode.net>
Mon, 15 Aug 2011 17:42:55 +0000 (13:42 -0400)
commit479ea8e07ae45474425642955f01e3b767e62fab
tree27ae73139904c2fd14ebcb027c0740c2a8d35fb4
parentac5515c92a74e89c485c31e46f8dd3d4b1accb53
LP#790329 org_lasso search is broken

Fix the JavaScript error when we attempt to create a feed for the
shortname of the org_unit_lasso (lassos have no shortname) - which lets
the request hit the backend Perl module, which in turn chokes on a test
for OU that only allows two conditions: either all digits is treated as
a numeric ID for an org unit, or it is a shortname. Of course, lassos
are negative integers, so we have to modify the test slightly to make it
happier.

There was no depth for org lasso copy counts, and this was handled
correctly in the main case by the asset.opac_lasso_record_copy_count()
function and its staff variant, but when a copy was not found at a given
org_unit in the lasso a request was made for the non-existent depth and
the function would error out.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/metabib.pm
Open-ILS/src/sql/Pg/040.schema.asset.sql
Open-ILS/src/sql/Pg/upgrade/XXXX.lp790329_opac_copy_count.sql [new file with mode: 0644]