From 124f0ff99a3dd79e049fb5c6c243dfb4a98d5a05 Mon Sep 17 00:00:00 2001 From: Chris Sharp Date: Tue, 28 Nov 2017 13:42:26 -0500 Subject: [PATCH] LP#1734963: Teach copy template converter about older templates. The XUL-to-web-client copy template converter created to fix bug 1691269 needs a little help when the value stored is a number rather than a string. Thanks to Jeff Godin for troubleshooting help and Mike Rylander for the suggested solution. Signed-off-by: Chris Sharp Signed-off-by: Jeff Godin --- Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js b/Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js index a87ea1ec34..7fe8ddd2b8 100644 --- a/Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js +++ b/Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js @@ -334,7 +334,7 @@ function(egCore , $q) { stat_cats[field_name] = parseInt(curr_field["value"]); } else { tmp_val = curr_field['value']; // so... some of the number fields are actually strings. Groovy. - if ( tmp_val.match(/^[-0-9.]+$/) && !(field_name.match(/(?:loan_duration|fine_level)/))) { + if ( tmp_val.toString().match(/^[-0-9.]+$/) && !(field_name.match(/(?:loan_duration|fine_level)/))) { tmp_val = parseFloat(tmp_val); } -- 2.11.0