From fdc1a997e3a174aff8496bdcea54dd23b7a1a669 Mon Sep 17 00:00:00 2001 From: jennylee Date: Wed, 18 Jun 2014 16:28:44 -0400 Subject: [PATCH] BUG-15193 Error in PM Table Data Search option The search option in PMTables has a validation where the APP_UID field is ignored in the search because this was causing some search troubles when you wanna search a number that was include into the APP_UID (eg. 'APP_UID':405044408538cb9472ade260172, 'text to search':4408 ) Now, we add a checkbox field near the search text field to customize this behavior. With this checkbox 'Search also in the APP_UID field' you can decide if the search will include or not the APP_UID field. --- workflow/engine/classes/model/AdditionalTables.php | 2 +- workflow/engine/controllers/pmTablesProxy.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/workflow/engine/classes/model/AdditionalTables.php b/workflow/engine/classes/model/AdditionalTables.php index 24a4c063a..14c79148f 100755 --- a/workflow/engine/classes/model/AdditionalTables.php +++ b/workflow/engine/classes/model/AdditionalTables.php @@ -400,7 +400,7 @@ class AdditionalTables extends BaseAdditionalTables $closure = ''; $types = array('INTEGER', 'BIGINT', 'SMALLINT', 'TINYINT', 'DECIMAL', 'DOUBLE', 'FLOAT', 'REAL'); foreach ($aData['FIELDS'] as $aField) { - if (($appUid == "false" && $aField['FLD_NAME'] != 'APP_UID') || ($appUid == "true")) { + if (($appUid == false && $aField['FLD_NAME'] != 'APP_UID') || ($appUid == true)) { if (in_array($aField['FLD_TYPE'], $types)) { if (is_numeric($filter)) { $stringOr = $stringOr . '$a = $oCriteria->getNewCriterion(' . $sClassPeerName . '::' . $aField['FLD_NAME'] . ', "' . $filter . '", Criteria::EQUAL)' . $closure . ';'; diff --git a/workflow/engine/controllers/pmTablesProxy.php b/workflow/engine/controllers/pmTablesProxy.php index 3eb414519..0364b4d0c 100755 --- a/workflow/engine/controllers/pmTablesProxy.php +++ b/workflow/engine/controllers/pmTablesProxy.php @@ -421,6 +421,7 @@ class pmTablesProxy extends HttpProxyController $start = isset( $httpData->start ) ? $httpData->start : 0; $limit = isset( $httpData->limit ) ? $httpData->limit : $limit_size; $appUid = isset( $httpData->appUid ) ? $httpData->appUid : false; + $appUid = ($appUid == "true") ? true : false; $filter = isset( $httpData->textFilter ) ? $httpData->textFilter : ''; $additionalTables = new AdditionalTables(); $table = $additionalTables->load( $httpData->id, true );