From 5d7e082060fce3ce0086cd9f6a97333c98aed7e1 Mon Sep 17 00:00:00 2001 From: Luis Fernando Saisa Lopez Date: Fri, 3 Jul 2015 12:18:26 -0400 Subject: [PATCH 1/7] =?UTF-8?q?PM-2913=20"(Code=20Scanner)=20Designer>Impo?= =?UTF-8?q?rt:=20La=20alerta..."=20SOLVED=20>=20Code=20Isuue:=20=20=20(Cod?= =?UTF-8?q?e=20Scanner)=20Designer=20>=20Import:=20La=20alerta=20de=20vali?= =?UTF-8?q?daci=C3=B3o=20se=20muestra=20completa=20en=20los=20navegadores?= =?UTF-8?q?=20Chrome=20>=20Solution:=20=20=20El=20texto=20que=20se=20muest?= =?UTF-8?q?ra=20en=20la=20ventana=20en=20el=20browser=20chrome=20se=20mues?= =?UTF-8?q?tra=20correctamente.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- workflow/engine/templates/processes/main.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/workflow/engine/templates/processes/main.js b/workflow/engine/templates/processes/main.js index 73e2b0f37..e74df4a45 100755 --- a/workflow/engine/templates/processes/main.js +++ b/workflow/engine/templates/processes/main.js @@ -1251,6 +1251,8 @@ importProcess = function() Ext.MessageBox.show({ title: _("ID_ERROR"), msg: "
" + stringReplace("\\x0A", "
", resp_.message) + "
", //\n 10 + width: 570, + height: 250, icon: Ext.MessageBox.ERROR, buttons: Ext.MessageBox.OK }); From 36ab8ffd1117bf3b9f6c86682475e67e13371291 Mon Sep 17 00:00:00 2001 From: "marcelo.cuiza" Date: Fri, 10 Jul 2015 20:42:26 -0400 Subject: [PATCH 2/7] PM-2890 0017477: Update in Variable convert special chars to unicode in the database Dynaform list dissapear Se cambio la forma de codificar valores utf8 --- .../src/ProcessMaker/BusinessModel/Variable.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/workflow/engine/src/ProcessMaker/BusinessModel/Variable.php b/workflow/engine/src/ProcessMaker/BusinessModel/Variable.php index 44fbf9136..b4fc4b89c 100755 --- a/workflow/engine/src/ProcessMaker/BusinessModel/Variable.php +++ b/workflow/engine/src/ProcessMaker/BusinessModel/Variable.php @@ -75,7 +75,12 @@ class Variable $variable->setVarDefault($arrayData["VAR_DEFAULT"]); } if (isset($arrayData["VAR_ACCEPTED_VALUES"])) { - $encodeAcceptedValues = json_encode($arrayData["VAR_ACCEPTED_VALUES"]); + $VAR_ACCEPTED_VALUES = $arrayData["VAR_ACCEPTED_VALUES"]; + foreach($VAR_ACCEPTED_VALUES as $key => $val) { + $VAR_ACCEPTED_VALUES[$key]["label"] = htmlentities($val["label"]); + $VAR_ACCEPTED_VALUES[$key]["value"] = htmlentities($val["value"]); + } + $encodeAcceptedValues = html_entity_decode(json_encode($VAR_ACCEPTED_VALUES)); $variable->setVarAcceptedValues($encodeAcceptedValues); } $variable->save(); @@ -168,7 +173,12 @@ class Variable $variable->setVarDefault($arrayData["VAR_DEFAULT"]); } if (isset($arrayData["VAR_ACCEPTED_VALUES"])) { - $encodeAcceptedValues = json_encode($arrayData["VAR_ACCEPTED_VALUES"]); + $VAR_ACCEPTED_VALUES = $arrayData["VAR_ACCEPTED_VALUES"]; + foreach($VAR_ACCEPTED_VALUES as $key => $val) { + $VAR_ACCEPTED_VALUES[$key]["label"] = htmlentities($val["label"]); + $VAR_ACCEPTED_VALUES[$key]["value"] = htmlentities($val["value"]); + } + $encodeAcceptedValues = html_entity_decode(json_encode($VAR_ACCEPTED_VALUES)); $variable->setVarAcceptedValues($encodeAcceptedValues); } $variable->save(); From a6da27260c93bb838e1794e28b916e666164b329 Mon Sep 17 00:00:00 2001 From: ricardo Date: Mon, 13 Jul 2015 12:11:57 -0400 Subject: [PATCH 3/7] 0017583: Clicking on the folder icon with a plus sign for Enterprise Features causes an error SOLVED al darle click a la imagen con el simbolo + daba un mensaje de error se soluciono quitandole la funcion de click en celda en la parte de features --- .../templates/enterprise/addonsStore.js | 32 ------------------- 1 file changed, 32 deletions(-) diff --git a/workflow/engine/templates/enterprise/addonsStore.js b/workflow/engine/templates/enterprise/addonsStore.js index 15b0bedef..1a417566d 100644 --- a/workflow/engine/templates/enterprise/addonsStore.js +++ b/workflow/engine/templates/enterprise/addonsStore.js @@ -1492,38 +1492,6 @@ Ext.onReady(function() { listeners: { render: function(){ this.loadMask = new Ext.LoadMask(this.body, {msg:_('ID_LOADING_GRID')}); - }, - "cellclick": function (grid, rowIndex, columnIndex, e) { - var record = grid.getStore().getAt(rowIndex); - var fieldName = grid.getColumnModel().getDataIndex(columnIndex); - - if (fieldName != "status") { - return; - } - - switch (record.get("status")) { - case "upgrade": - case "ready": - if (INTERNET_CONNECTION == 1) { - installAddon(record.get("id"), record.get("store")); - } else { - Ext.MessageBox.alert(_('ID_INFORMATION'), _('ID_NO_INTERNET_CONECTION')); - } - break; - case "download": - Ext.Ajax.request({ - url: "addonsStoreAction", - params: { - "action": "cancel", - "addon": record.get("id"), - "store": record.get("store") - } - }); - break; - case "available": - addonAvailable(record.get("id")); - break; - } } } }); From 7f38aa4888262c930859185124fd183b98800a6d Mon Sep 17 00:00:00 2001 From: "marcelo.cuiza" Date: Mon, 13 Jul 2015 17:35:40 -0400 Subject: [PATCH 4/7] PM-2890 0017477: Update in Variable convert special chars to unicode in the database Dynaform list dissapear Se cambio la forma de codificar valores utf8 --- .../src/ProcessMaker/BusinessModel/Variable.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/workflow/engine/src/ProcessMaker/BusinessModel/Variable.php b/workflow/engine/src/ProcessMaker/BusinessModel/Variable.php index b4fc4b89c..502fbfdf1 100755 --- a/workflow/engine/src/ProcessMaker/BusinessModel/Variable.php +++ b/workflow/engine/src/ProcessMaker/BusinessModel/Variable.php @@ -77,10 +77,10 @@ class Variable if (isset($arrayData["VAR_ACCEPTED_VALUES"])) { $VAR_ACCEPTED_VALUES = $arrayData["VAR_ACCEPTED_VALUES"]; foreach($VAR_ACCEPTED_VALUES as $key => $val) { - $VAR_ACCEPTED_VALUES[$key]["label"] = htmlentities($val["label"]); - $VAR_ACCEPTED_VALUES[$key]["value"] = htmlentities($val["value"]); + $VAR_ACCEPTED_VALUES[$key]["label"] = htmlentities($val["label"], ENT_IGNORE, 'UTF-8'); + $VAR_ACCEPTED_VALUES[$key]["value"] = htmlentities($val["value"], ENT_IGNORE, 'UTF-8'); } - $encodeAcceptedValues = html_entity_decode(json_encode($VAR_ACCEPTED_VALUES)); + $encodeAcceptedValues = html_entity_decode(json_encode($VAR_ACCEPTED_VALUES), ENT_IGNORE, 'UTF-8'); $variable->setVarAcceptedValues($encodeAcceptedValues); } $variable->save(); @@ -175,10 +175,10 @@ class Variable if (isset($arrayData["VAR_ACCEPTED_VALUES"])) { $VAR_ACCEPTED_VALUES = $arrayData["VAR_ACCEPTED_VALUES"]; foreach($VAR_ACCEPTED_VALUES as $key => $val) { - $VAR_ACCEPTED_VALUES[$key]["label"] = htmlentities($val["label"]); - $VAR_ACCEPTED_VALUES[$key]["value"] = htmlentities($val["value"]); + $VAR_ACCEPTED_VALUES[$key]["label"] = htmlentities($val["label"], ENT_IGNORE,'UTF-8'); + $VAR_ACCEPTED_VALUES[$key]["value"] = htmlentities($val["value"], ENT_IGNORE,'UTF-8'); } - $encodeAcceptedValues = html_entity_decode(json_encode($VAR_ACCEPTED_VALUES)); + $encodeAcceptedValues = html_entity_decode(json_encode($VAR_ACCEPTED_VALUES), ENT_IGNORE, 'UTF-8'); $variable->setVarAcceptedValues($encodeAcceptedValues); } $variable->save(); From 9cdee7bb50e3ea3daec49bfa1bfa4e2fee2c02ad Mon Sep 17 00:00:00 2001 From: Victor Saisa Lopez Date: Mon, 13 Jul 2015 18:39:59 -0400 Subject: [PATCH 5/7] PM-2576 "Support for Timer-Event (End-points and Backend)" SOLVED Issue: Los procesos inactivos siguen ejecutandose con el timereventcron Cause: Falta validacion para procesos inactivos Solution: Se agrego validacion, solo se consideran a procesos activos para iniciar/continuar el caso --- .../src/ProcessMaker/BusinessModel/TimerEvent.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/workflow/engine/src/ProcessMaker/BusinessModel/TimerEvent.php b/workflow/engine/src/ProcessMaker/BusinessModel/TimerEvent.php index 4d4423fdc..de2c8f6ce 100644 --- a/workflow/engine/src/ProcessMaker/BusinessModel/TimerEvent.php +++ b/workflow/engine/src/ProcessMaker/BusinessModel/TimerEvent.php @@ -1190,6 +1190,12 @@ class TimerEvent $criteria->addSelectColumn(\BpmnEventPeer::EVN_NAME); $criteria->addSelectColumn(\ElementTaskRelationPeer::TAS_UID); + $arrayCondition = array(); + $arrayCondition[] = array(\TimerEventPeer::PRJ_UID, \ProcessPeer::PRO_UID, \Criteria::EQUAL); + $criteria->addJoinMC($arrayCondition, \Criteria::INNER_JOIN); + + $criteria->add(\ProcessPeer::PRO_STATUS, "ACTIVE", \Criteria::EQUAL); + $arrayCondition = array(); $arrayCondition[] = array(\TimerEventPeer::PRJ_UID, \ElementTaskRelationPeer::PRJ_UID, \Criteria::EQUAL); $arrayCondition[] = array(\TimerEventPeer::EVN_UID, \ElementTaskRelationPeer::ELEMENT_UID, \Criteria::EQUAL); @@ -1257,6 +1263,8 @@ class TimerEvent if ((int)($hour . $minute) <= (int)($hourCase . $minuteCase)) { $flagCase = $hourCase == $hour && $minuteCase == $minute; } else { + $timerEventNextRunDateNew = $this->getNextRunDateByDataAndDatetime($arrayTimerEventData, $datetime); //Generate new date for old TMREVN_NEXT_RUN_DATE + $flagCase = true; //Create the old case } } @@ -1361,6 +1369,12 @@ class TimerEvent $criteriaMain->addSelectColumn(\AppDelegationPeer::DEL_DELEGATE_DATE); $criteriaMain->addSelectColumn(\BpmnEventPeer::EVN_NAME); + $arrayCondition = array(); + $arrayCondition[] = array(\AppDelegationPeer::PRO_UID, \ProcessPeer::PRO_UID, \Criteria::EQUAL); + $criteriaMain->addJoinMC($arrayCondition, \Criteria::INNER_JOIN); + + $criteriaMain->add(\ProcessPeer::PRO_STATUS, "ACTIVE", \Criteria::EQUAL); + $arrayCondition = array(); $arrayCondition[] = array(\AppDelegationPeer::APP_UID, \ApplicationPeer::APP_UID, \Criteria::EQUAL); $criteriaMain->addJoinMC($arrayCondition, \Criteria::INNER_JOIN); From e1368978bde361c250220d14ae2479ae295f1886 Mon Sep 17 00:00:00 2001 From: Roly Rudy Gutierrez Pinto Date: Tue, 14 Jul 2015 11:06:38 -0400 Subject: [PATCH 6/7] PM-3065 --- workflow/engine/classes/class.pmDynaform.php | 44 ++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/workflow/engine/classes/class.pmDynaform.php b/workflow/engine/classes/class.pmDynaform.php index 04a0f6f47..b50accfd6 100644 --- a/workflow/engine/classes/class.pmDynaform.php +++ b/workflow/engine/classes/class.pmDynaform.php @@ -16,6 +16,7 @@ class pmDynaform public $credentials = null; public $lang = null; public $langs = null; + private $dependent = null; //todo public function __construct($fields = array()) { @@ -184,6 +185,21 @@ class pmDynaform if ($json->data["label"] === "") { $json->data["label"] = $json->data["value"]; } + //synchronize data label + $withoutOptions = true; + foreach ($json->options as $io) { + if ($json->data["value"] === $io["value"]) { + if ($json->data["label"] != $io["label"]) { + $this->dependent = $json->variable; //todo + $json->data["label"] = $io["label"]; + $withoutOptions = false; + } + } + } + if ($withoutOptions) { + $json->data["label"] = $json->data["value"];//todo + } + //end synchronize data label } if ($key === "type" && ($value === "checkbox")) { $json->data = array( @@ -253,6 +269,27 @@ class pmDynaform } } + public function jsond(&$json) + { + foreach ($json as $key => &$value) { + $sw1 = is_array($value); + $sw2 = is_object($value); + if ($sw1 || $sw2) { + $this->jsond($value); + } + if (!$sw1 && !$sw2) { + if (isset($json->dbConnection) && $json->dbConnection !== "" && $json->dbConnection !== "none" && isset($json->sql) && $json->sql != "") { + $prefix = array("@@", "@#", "@%", "@?", "@$", "@="); + foreach ($prefix as $val) { + if (strpos($json->sql, $val . $this->dependent) !== false) { + $json->data = array("value" => "", "label" => ""); + } + } + } + } + } + } + public function isResponsive() { return $this->record != null && $this->record["DYN_VERSION"] == 2 ? true : false; @@ -273,6 +310,7 @@ class pmDynaform } $this->jsonr($json); + $this->jsond($json); //todo $javascript = "