From 37d92d455d5a6bb0d84ceffe1c7be7b9694e5090 Mon Sep 17 00:00:00 2001 From: Roly Rudy Gutierrez Pinto Date: Mon, 11 Apr 2016 15:01:00 -0400 Subject: [PATCH] HOR-735 --- workflow/engine/classes/class.pmFunctions.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/workflow/engine/classes/class.pmFunctions.php b/workflow/engine/classes/class.pmFunctions.php index f0fb6f715..85d47d8f5 100755 --- a/workflow/engine/classes/class.pmFunctions.php +++ b/workflow/engine/classes/class.pmFunctions.php @@ -427,6 +427,17 @@ function evaluateFunction ($aGrid, $sExpresion) $pmScript->execute(); $aGrid[$i] = $pmScript->aFields; + + //compatibility for var_label + foreach ($aFields as $j => $val) { + if (isset($aGrid[$i][$j . "_label"]) && empty($aGrid[$i][$j . "_label"]) && !empty($aGrid[$i][$j])) { + $aGrid[$i][$j . "_label"] = $aGrid[$i][$j]; + } + if (substr($j, -6) !== "_label" && ($val !== $aGrid[$i][$j])) { + $aGrid[$i][$j . "_label"] = $aGrid[$i][$j]; + } + } + //end } return $aGrid; }