LP#790329 org_lasso search is broken user/dbs/lp790329
authorDan Scott <dan@coffeecode.net>
Thu, 28 Jul 2011 18:29:48 +0000 (14:29 -0400)
committerDan Scott <dan@coffeecode.net>
Mon, 15 Aug 2011 15:53:13 +0000 (11:53 -0400)
commit3e867fe376db3288218c09917b8f50a7e64f41dc
tree53a5f4d9ffe269c9b6f4ea5a480914c6076b1e61
parentff7c382023385d80dc476f9e94d50bbf88763b2a
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/lib/OpenILS/Application/Storage/Publisher/metabib.pm
Open-ILS/src/sql/Pg/040.schema.asset.sql
Open-ILS/src/sql/Pg/upgrade/XXXX.lp790329_opac_lasso_counts.sql [new file with mode: 0644]
Open-ILS/src/sql/Pg/upgrade/XXXX.lp790329_staff_opac_lasso_counts.sql [new file with mode: 0644]
Open-ILS/web/opac/skin/default/js/result_common.js