updated report param editor to handle join types embedded in the field name. this...
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 10 Jun 2010 18:47:57 +0000 (18:47 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 10 Jun 2010 18:47:57 +0000 (18:47 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@16655 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/reports/oils_rpt_utils.js

index 8648b73..2ab687e 100644 (file)
@@ -93,11 +93,13 @@ function oilsRptMakeLabel(path) {
        var parts = path.split(/-/);
        var str = '';
        for( var i = 0; i < parts.length; i++ ) {
-               if(i%2 == 0) {
+               if(i%2 == 0) { // IDL class names
                        if( i == 0 )
                                str += oilsIDL[parts[i]].label;
-               } else {
-                       var f = oilsRptFindField(oilsIDL[parts[i-1]], parts[i]);
+               } else { // Field names
+            var name = parts[i];
+            name = name.replace(/>.*/,''); // field name may be appended with >join-type
+            var f = oilsRptFindField(oilsIDL[parts[i-1]], name);
                        str += " -> "+f.label;
                }
        }