From f410ef07af326b1e0fe27b1124dec255688ca575 Mon Sep 17 00:00:00 2001 From: Freddy Daniel Rojas Valda Date: Mon, 2 Feb 2015 16:10:21 -0400 Subject: [PATCH 1/4] PM-1404 "EmailTemplate no devuelve variables creadas para el proceso" SOLVED --- .../engine/methods/cases/cases_SaveData.php | 44 ++++++++++--------- 1 file changed, 24 insertions(+), 20 deletions(-) mode change 100644 => 100755 workflow/engine/methods/cases/cases_SaveData.php diff --git a/workflow/engine/methods/cases/cases_SaveData.php b/workflow/engine/methods/cases/cases_SaveData.php old mode 100644 new mode 100755 index 3958810bf..125ff7d16 --- a/workflow/engine/methods/cases/cases_SaveData.php +++ b/workflow/engine/methods/cases/cases_SaveData.php @@ -69,6 +69,10 @@ try { $oCase->thisIsTheCurrentUser( $_SESSION["APPLICATION"], $_SESSION["INDEX"], $_SESSION["USER_LOGGED"], "REDIRECT", "casesListExtJs" ); $Fields = $oCase->loadCase( $_SESSION["APPLICATION"] ); + if ($swpmdynaform) { + $Fields["APP_DATA"] = array_merge( $Fields["APP_DATA"], $pmdynaform ); + } + $Fields["APP_DATA"] = array_merge( $Fields["APP_DATA"], G::getSystemConstants() ); $Fields["APP_DATA"] = array_merge( $Fields["APP_DATA"], $_POST["form"] ); @@ -123,27 +127,27 @@ try { $aAux = explode( '|', $oForm->fields[$oForm->fields[$sField]->pmconnection]->keys ); $i = 0; $aValues = array (); - if($aData == "" || count($aData['FIELDS']) < 1){ - $message = G::LoadTranslation( 'ID_PMTABLE_NOT_FOUNDED_SAVED_DATA' ); - G::SendMessageText( $message, "WARNING" ); - $aRow = false; + if ($aData == "" || count($aData['FIELDS']) < 1) { + $message = G::LoadTranslation( 'ID_PMTABLE_NOT_FOUNDED_SAVED_DATA' ); + G::SendMessageText( $message, "WARNING" ); + $aRow = false; } else { - foreach ($aData['FIELDS'] as $aField) { - if ($aField['FLD_KEY'] == '1') { - $aKeys[$aField['FLD_NAME']] = (isset( $aAux[$i] ) ? G::replaceDataField( $aAux[$i], $Fields['APP_DATA'] ) : ''); - $i ++; - } - if ($aField['FLD_NAME'] == $oForm->fields[$sField]->pmfield) { - $aValues[$aField['FLD_NAME']] = $Fields['APP_DATA'][$sField]; - } else { - $aValues[$aField['FLD_NAME']] = ''; - } - } - try { - $aRow = $oAdditionalTables->getDataTable( $oForm->fields[$oForm->fields[$sField]->pmconnection]->pmtable, $aKeys ); - } catch (Exception $oError) { - $aRow = false; - } + foreach ($aData['FIELDS'] as $aField) { + if ($aField['FLD_KEY'] == '1') { + $aKeys[$aField['FLD_NAME']] = (isset( $aAux[$i] ) ? G::replaceDataField( $aAux[$i], $Fields['APP_DATA'] ) : ''); + $i ++; + } + if ($aField['FLD_NAME'] == $oForm->fields[$sField]->pmfield) { + $aValues[$aField['FLD_NAME']] = $Fields['APP_DATA'][$sField]; + } else { + $aValues[$aField['FLD_NAME']] = ''; + } + } + try { + $aRow = $oAdditionalTables->getDataTable( $oForm->fields[$oForm->fields[$sField]->pmconnection]->pmtable, $aKeys ); + } catch (Exception $oError) { + $aRow = false; + } } if ($aRow) { From 43742f7dc262d0e68b86977aa42fce4974cc896c Mon Sep 17 00:00:00 2001 From: norahmollo Date: Tue, 3 Feb 2015 10:05:12 -0400 Subject: [PATCH 2/4] PM-1395 Se necesita que el campo: "From Mail" y habilitar "ServerEmailForDefault" para que se pueda enviar correos Se anadieron marcas para generar la version community sin el checkbox ServerEmailForDefault --- .../templates/emailServer/emailServer.js | 51 ++++++++++++++----- 1 file changed, 39 insertions(+), 12 deletions(-) diff --git a/workflow/engine/templates/emailServer/emailServer.js b/workflow/engine/templates/emailServer/emailServer.js index 630549482..4feabbe8e 100644 --- a/workflow/engine/templates/emailServer/emailServer.js +++ b/workflow/engine/templates/emailServer/emailServer.js @@ -38,9 +38,21 @@ emailServer.application = { //Data var p; + /*----------------------------------********---------------------------------*/ + if (Ext.getCmp("chkEmailServerDefault").checked) { + /*----------------------------------********---------------------------------*/ + var emailDefault = 1; + /*----------------------------------********---------------------------------*/ + } else { + var emailDefault = 0; + } + /*----------------------------------********---------------------------------*/ + switch (option) { + case "INS": var typeEmailEngine = Ext.getCmp("cboEmailEngine").getValue(); + if (typeEmailEngine == "PHPMAILER") { var rdoGrpOption = Ext.getCmp("rdoGrpSmtpSecure").getValue(); @@ -60,7 +72,7 @@ emailServer.application = { smtpSecure: smtpSecure, sendTestMail: (Ext.getCmp("chkSendTestMail").checked)? 1 : 0, mailTo: Ext.getCmp("txtMailTo").getValue(), - emailServerDefault: (Ext.getCmp("chkEmailServerDefault").checked)? 1 : 0 + emailServerDefault: emailDefault }; } else { //MAIL @@ -72,7 +84,7 @@ emailServer.application = { fromName: Ext.getCmp("txtFromName").getValue(), sendTestMail: (Ext.getCmp("chkSendTestMail").checked)? 1 : 0, mailTo: Ext.getCmp("txtMailTo").getValue(), - emailServerDefault: (Ext.getCmp("chkEmailServerDefault").checked)? 1 : 0 + emailServerDefault: emailDefault }; } break; @@ -98,7 +110,7 @@ emailServer.application = { smtpSecure: smtpSecure, sendTestMail: (Ext.getCmp("chkSendTestMail").checked)? 1 : 0, mailTo: Ext.getCmp("txtMailTo").getValue(), - emailServerDefault: (Ext.getCmp("chkEmailServerDefault").checked)? 1 : 0 + emailServerDefault: emailDefault }; } else { //MAIL @@ -111,7 +123,7 @@ emailServer.application = { fromName: Ext.getCmp("txtFromName").getValue(), sendTestMail: (Ext.getCmp("chkSendTestMail").checked)? 1 : 0, mailTo: Ext.getCmp("txtMailTo").getValue(), - emailServerDefault: (Ext.getCmp("chkEmailServerDefault").checked)? 1 : 0 + emailServerDefault: emailDefault }; } break; @@ -144,7 +156,7 @@ emailServer.application = { smtpSecure: smtpSecure, sendTestMail: (Ext.getCmp("chkSendTestMail").checked)? 1 : 0, mailTo: Ext.getCmp("txtMailTo").getValue(), - emailServerDefault: (Ext.getCmp("chkEmailServerDefault").checked)? 1 : 0 + emailServerDefault: emailDefault }; } else { //MAIL @@ -156,7 +168,7 @@ emailServer.application = { fromName: Ext.getCmp("txtFromName").getValue(), sendTestMail: (Ext.getCmp("chkSendTestMail").checked)? 1 : 0, mailTo: Ext.getCmp("txtMailTo").getValue(), - emailServerDefault: (Ext.getCmp("chkEmailServerDefault").checked)? 1 : 0 + emailServerDefault: emailDefault }; } break; @@ -251,7 +263,9 @@ emailServer.application = { Ext.getCmp("txtMailTo").setValue(""); + /*----------------------------------********---------------------------------*/ Ext.getCmp("chkEmailServerDefault").setValue(false); + /*----------------------------------********---------------------------------*/ winData.setTitle(_("ID_EMAIL_SERVER_NEW")); winData.setDisabled(false); @@ -287,8 +301,17 @@ emailServer.application = { emailServerSetMailTo(Ext.getCmp("chkSendTestMail").checked); Ext.getCmp("txtMailTo").setValue(record.get("MAIL_TO")); - Ext.getCmp("chkEmailServerDefault").setValue((parseInt(record.get("MESS_DEFAULT")) == 1)? true : false); - + + /*----------------------------------********---------------------------------*/ + if (parseInt(record.get("MESS_DEFAULT")) == 1) { + /*----------------------------------********---------------------------------*/ + Ext.getCmp("chkEmailServerDefault").setValue(true); + /*----------------------------------********---------------------------------*/ + } else { + Ext.getCmp("chkEmailServerDefault").setValue(false); + } + /*----------------------------------********---------------------------------*/ + winData.setTitle(_("ID_EMAIL_SERVER_EDIT")); winData.setDisabled(false); winData.show(); @@ -591,6 +614,7 @@ emailServer.application = { } }); + var txtAccountFrom = new Ext.form.TextField({ id: "txtAccountFrom", name: "txtAccountFrom", @@ -599,7 +623,7 @@ emailServer.application = { vtype: "emailUrlValidation" }); - + var txtPassword = new Ext.form.TextField({ id: "txtPassword", name: "txtPassword", @@ -662,14 +686,14 @@ emailServer.application = { hidden: true }); - + /*----------------------------------********---------------------------------*/ var chkEmailServerDefault = new Ext.form.Checkbox({ id: "chkEmailServerDefault", name: "chkEmailServerDefault", boxLabel: _("ID_EMAIL_SERVER_THIS_CONFIGURATION_IS_DEFAULT") }); - + /*----------------------------------********---------------------------------*/ var btnTest = new Ext.Action({ id: "btnTest", text: _("ID_TEST"), @@ -760,8 +784,11 @@ emailServer.application = { txtFromName, rdoGrpSmtpSecure, chkSendTestMail, - txtMailTo, + txtMailTo + /*----------------------------------********---------------------------------*/ + , chkEmailServerDefault + /*----------------------------------********---------------------------------*/ ] }) ], From b7fc7ee98010ad2f773c3496e25e552855e8474c Mon Sep 17 00:00:00 2001 From: Freddy Daniel Rojas Valda Date: Tue, 3 Feb 2015 15:44:38 -0400 Subject: [PATCH 3/4] PM-978 "FIX notice new issues(webentry, variables). Complete Extended XML bpmn schema to add running artifacts in file .pmx" SOLVED --- workflow/engine/classes/class.processes.php | 14 ++++++++------ .../src/ProcessMaker/Project/Workflow.php | 17 +++++++++-------- 2 files changed, 17 insertions(+), 14 deletions(-) mode change 100644 => 100755 workflow/engine/src/ProcessMaker/Project/Workflow.php diff --git a/workflow/engine/classes/class.processes.php b/workflow/engine/classes/class.processes.php index b74d241af..606dd2bf3 100755 --- a/workflow/engine/classes/class.processes.php +++ b/workflow/engine/classes/class.processes.php @@ -2197,12 +2197,14 @@ class Processes public function renewAllProcessVariableUid(&$data) { try { - $map = array (); - foreach ($data->processVariables as $key => $val) { - if (isset( $val['VAR_UID'] )) { - $newGuid = $this->getUnusedProcessVariableGUID(); - $map[$val['VAR_UID']] = $newGuid; - $data->processVariables[$key]['VAR_UID'] = $newGuid; + if (isset($data->processVariables)) { + $map = array(); + foreach ($data->processVariables as $key => $val) { + if (isset($val['VAR_UID'])) { + $newGuid = $this->getUnusedProcessVariableGUID(); + $map[$val['VAR_UID']] = $newGuid; + $data->processVariables[$key]['VAR_UID'] = $newGuid; + } } } diff --git a/workflow/engine/src/ProcessMaker/Project/Workflow.php b/workflow/engine/src/ProcessMaker/Project/Workflow.php old mode 100644 new mode 100755 index 752cbc2fa..095d36fe7 --- a/workflow/engine/src/ProcessMaker/Project/Workflow.php +++ b/workflow/engine/src/ProcessMaker/Project/Workflow.php @@ -1153,19 +1153,20 @@ class Workflow extends Handler } //Update WEB_ENTRY_EVENT.EVN_UID - foreach ($arrayWorkflowData["webEntryEvent"] as $key => $value) { - $webEntryEventEventUid = $arrayWorkflowData["webEntryEvent"][$key]["EVN_UID"]; + if (isset($arrayWorkflowData["webEntryEvent"])) { + foreach ($arrayWorkflowData["webEntryEvent"] as $key => $value) { + $webEntryEventEventUid = $arrayWorkflowData["webEntryEvent"][$key]["EVN_UID"]; - foreach ($arrayUid as $value2) { - $arrayItem = $value2; + foreach ($arrayUid as $value2) { + $arrayItem = $value2; - if ($arrayItem["old_uid"] == $webEntryEventEventUid) { - $arrayWorkflowData["webEntryEvent"][$key]["EVN_UID"] = $arrayItem["new_uid"]; - break; + if ($arrayItem["old_uid"] == $webEntryEventEventUid) { + $arrayWorkflowData["webEntryEvent"][$key]["EVN_UID"] = $arrayItem["new_uid"]; + break; + } } } } - //Workflow tables $workflowData = (object)($arrayWorkflowData); From 5770900707d8a2bf6535ad6e9aaa889dba8ed6ad Mon Sep 17 00:00:00 2001 From: william Date: Tue, 3 Feb 2015 17:01:00 -0400 Subject: [PATCH 4/4] Campo Status en creacion de grupos es editable. Causa. En es una ventana POPUP, que muestra 2 elementos, una que recibe el nombre del GRUPO a crearse y el otro es un COMBOBOX, de activo e inactivo sin embargo son editables; es decir cuando seleccionas ACTIVO lo puedes sobre escribir con cualquier texto. Solucion. Editar el archivo que contiene estos controldaores y hacer no EDITABLE el COMBOBOX, mas o menos de la siguiente manera: setEditable(false). --- workflow/engine/templates/groups/groupsList.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/workflow/engine/templates/groups/groupsList.js b/workflow/engine/templates/groups/groupsList.js index 4146dbbe7..946c8b98f 100755 --- a/workflow/engine/templates/groups/groupsList.js +++ b/workflow/engine/templates/groups/groupsList.js @@ -352,6 +352,8 @@ DoNothing = function(){}; NewGroupWindow = function(){ newForm.getForm().reset(); newForm.getForm().items.items[0].focus('',500); + newForm.getForm().items.items[1].setEditable(false); + w = new Ext.Window({ autoHeight: true, width: 400,