LP#1570091: webstaff: fix handling of default copy status
authorMike Rylander <mrylander@gmail.com>
Wed, 24 Feb 2016 16:32:50 +0000 (11:32 -0500)
committerBill Erickson <berickxx@gmail.com>
Wed, 20 Apr 2016 14:51:32 +0000 (10:51 -0400)
The status must be an int, so we cast it when coming from an YAOUS

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js

index 78c14b0..51c8dcb 100644 (file)
@@ -279,8 +279,9 @@ function(egCore , $q) {
             [status_setting],
             owningLib
         ).then(function(set) {
-            var default_ccs = set[status_setting] || 
-                (isFastAdd ? 0 : 5); // 0 is Available, 5 is In Process
+            var default_ccs = parseInt(set[status_setting]);
+            if (isNaN(default_ccs))
+                default_ccs = (isFastAdd ? 0 : 5); // 0 is Available, 5 is In Process
             cp.status(default_ccs);
         });