]> git.evergreen-ils.org Git - Evergreen.git/commit
Avoid JSPAC hold placement interface problems when no holdable copies
authorLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Fri, 24 Feb 2012 19:56:18 +0000 (14:56 -0500)
committerMike Rylander <mrylander@gmail.com>
Tue, 20 Mar 2012 16:42:36 +0000 (12:42 -0400)
commitc7835817977a4b38ea0c4478c17a515a573d1ec8
treeb34fb3410f6c6341b6291c46aa90dc8d36658dee
parente5b2b74c1f8fe9efe0cd62411dd2d27df672c47d
Avoid JSPAC hold placement interface problems when no holdable copies

This addresses a bug brought to my attention by John Jones.

When you're trying to place certain holds (at least title level holds) on
records for which there are no holdable formats (no descriptors as returned by
open-ils.search.metabib.record_to_descriptors), then
holdArgs.recordDescriptors in holds.js can be an empty array.  There is
a line of code that assumes this will never happen.

The end user-visible result of the javascript failing here is an alert()
dialog about phone number format, but this is a red herring.  That only
happens because the problem code is in one big function that has too
many responsibilites.

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Michael Peters <mrpeters@library.in.gov>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/web/opac/skin/default/js/holds.js