[open-ils-commits] [GIT] Evergreen ILS branch rel_2_0 updated. 2ec4e2d7fb76584c1869d84a0b36bf4c26ddb1e2

Evergreen Git git at git.evergreen-ils.org
Tue Mar 20 12:37:15 EDT 2012


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, rel_2_0 has been updated
       via  2ec4e2d7fb76584c1869d84a0b36bf4c26ddb1e2 (commit)
      from  73210058130eb5784f7aa2aed5c6c4f173a4b235 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 2ec4e2d7fb76584c1869d84a0b36bf4c26ddb1e2
Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
Date:   Fri Feb 24 14:56:18 2012 -0500

    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 at esilibrary.com>
    Signed-off-by: Michael Peters <mrpeters at library.in.gov>
    Signed-off-by: Mike Rylander <mrylander at gmail.com>

diff --git a/Open-ILS/web/opac/skin/default/js/holds.js b/Open-ILS/web/opac/skin/default/js/holds.js
index 55d9c2b..bae8032 100644
--- a/Open-ILS/web/opac/skin/default/js/holds.js
+++ b/Open-ILS/web/opac/skin/default/js/holds.js
@@ -451,7 +451,7 @@ function __holdsDrawWindow() {
 	var mods_formats = rec.types_of_resource();
 	var formats;
 
-	if(holdArgs.recordDescriptors)
+	if (holdArgs.recordDescriptors && holdArgs.recordDescriptors.length)
 		formats = holdArgs.recordDescriptors[0].item_type();
 
 	if( holdArgs.type == 'T' ) {

-----------------------------------------------------------------------

Summary of changes:
 Open-ILS/web/opac/skin/default/js/holds.js |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list