LP#790329 org_lasso search is broken
authorDan Scott <dan@coffeecode.net>
Thu, 28 Jul 2011 18:29:48 +0000 (14:29 -0400)
committerMike Rylander <mrylander@gmail.com>
Tue, 16 Aug 2011 15:12:18 +0000 (11:12 -0400)
commit1edf295d3a4d4dced891513323d13bbd3a08e568
tree37633a994bd4d7ba9107e67bc9f8cad11387448b
parent0daa9d86745a89b3899cb1cb8830fe659d07b3b9
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>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
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