From 8fc840d82995cb8b55e596b1c8b218aff7c19f35 Mon Sep 17 00:00:00 2001 From: Marco Antonio Nina Date: Mon, 26 May 2014 09:25:58 -0400 Subject: [PATCH 1/9] BUG-15029 We can`t rename a folder in Documents SOLVED - Error in position validate "function_exists". - Change of position of validation in file appFolderAjax.php. --- workflow/engine/methods/appFolder/appFolderAjax.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/workflow/engine/methods/appFolder/appFolderAjax.php b/workflow/engine/methods/appFolder/appFolderAjax.php index 9f07313e3..6ee91744a 100755 --- a/workflow/engine/methods/appFolder/appFolderAjax.php +++ b/workflow/engine/methods/appFolder/appFolderAjax.php @@ -20,12 +20,6 @@ if (! isset ($_REQUEST ['action'])) { print G::json_encode ($res); die (); } -if (! function_exists ($_REQUEST['action']) || !G::isUserFunction($_REQUEST['action'])) { - $res ['success'] = false; - $res ['message'] = 'The requested action does not exist'; - print G::json_encode ($res); - die (); -} if (($_REQUEST['action']) != 'rename') { $functionName = $_REQUEST ['action']; @@ -48,6 +42,12 @@ if (($_REQUEST['action']) != 'rename') { renameFolder ($oldname, $newname, $uid); } +if (! function_exists ($_REQUEST['action']) || !G::isUserFunction($_REQUEST['action'])) { + $res ['success'] = false; + $res ['message'] = 'The requested action does not exist'; + print G::json_encode ($res); + die (); +} ///////////////////////////////////////////// function renameFolder($oldname, $newname, $uid) From 9e63dae32396bf78b9a8eb3a3835fb4470f64e02 Mon Sep 17 00:00:00 2001 From: Marco Antonio Nina Date: Mon, 26 May 2014 12:42:03 -0400 Subject: [PATCH 2/9] BUG-15031 We can't delete folders using controls into grid SOLVED - Type is not defined 'file or directory' - add type in file casesDocuments.js --- .../engine/templates/cases/casesDocuments.js | 103 +++++++++++------- 1 file changed, 61 insertions(+), 42 deletions(-) diff --git a/workflow/engine/templates/cases/casesDocuments.js b/workflow/engine/templates/cases/casesDocuments.js index a5be99239..72ea9ff29 100755 --- a/workflow/engine/templates/cases/casesDocuments.js +++ b/workflow/engine/templates/cases/casesDocuments.js @@ -34,6 +34,7 @@ catch(z){ itemSelected = ""; lastDir = ""; var conn = new Ext.data.Connection(); +var showDirs = 'noFolders'; streamFilefromPM=function(fileStream) { Ext.Ajax.request({ @@ -605,6 +606,9 @@ function getRequestParams() { } else { sOptiondir='documents'; + if (selectedRows[0].data.owner == '') { + sOptiondir='directory'; + } selitems = Array(selectedRows.length); if( selectedRows.length > 0 ) { @@ -1128,18 +1132,10 @@ var gridtb = new Ext.Toolbar( handler : function(btn, e) { if (btn.pressed) { datastore.sendWhat = 'both'; - loadDir(); } else { datastore.sendWhat = 'files'; - loadDir(); - } - if (showDirs) { - Ext.getCmp("showOrHiDirs").setText(_('ID_SHOW_DIRS')); - showDirs = false; - } else { - Ext.getCmp("showOrHiDirs").setText(_('ID_HIDE_DIRS')); - showDirs = true; } + loadDir(); } }), '-', new Ext.form.TextField({ name : "filterValue", @@ -1321,11 +1317,15 @@ rowExpander, { header: _("ID_SIZE"), dataIndex: "size", width: 50, + sortable: false, + hideable: false, hidden: true }, { header: _("ID_PERMISSIONS"), dataIndex: "perms", width: 100, + sortable: false, + hideable: false, hidden: true }, { dataIndex: "is_deletable", @@ -1373,28 +1373,34 @@ rowExpander, { cm.defaultSortable = true; function handleRowClick(sm, rowIndex) {//alert(rowIndex); - // console.log("Row Clicked: "+rowIndex); - var selections = sm.getSelections(); - tb = ext_itemgrid.getTopToolbar(); - if (selections.length > 1) { -// tb.items.get('tb_delete').enable(); - tb.items.get('tb_delete')[permitodelete==1 ? 'enable': 'disable'](); - tb.items.get('tb_rename').disable(); - tb.items.get('tb_download').hide(); - //tb.items.get('tb_download').disable(); - } else if (selections.length == 1) { - -// tb.items.get('tb_delete')[selections[0].get('is_deletable') ? 'enable': 'disable'](); - tb.items.get('tb_delete')[permitodelete==1 ? 'enable': 'disable'](); - tb.items.get('tb_rename')[selections[0].get('is_deletable') ? 'disable': 'disable'](); - tb.items.get('tb_download')[selections[0].get('is_readable') - && selections[0].get('is_file') ? 'show' : 'hide'](); - } else { - tb.items.get('tb_delete').disable(); - tb.items.get('tb_rename').disable(); - tb.items.get('tb_download').hide(); - } - return true; + //console.log("Row Clicked: ", rowIndex); + var selections = sm.getSelections(); + tb = ext_itemgrid.getTopToolbar(); + if (selections.length > 1) { + //tb.items.get('tb_delete').enable(); + tb.items.get('tb_delete')[permitodelete==1 ? 'enable': 'disable'](); + tb.items.get('tb_rename').disable(); + tb.items.get('tb_download').hide(); + //tb.items.get('tb_download').disable(); + } else if (selections.length == 1) { + //tb.items.get('tb_delete')[selections[0].get('is_deletable') ? 'enable': 'disable'](); + tb.items.get('tb_delete')[permitodelete==1 ? 'enable': 'disable'](); + tb.items.get('tb_rename')[selections[0].get('is_deletable') ? 'disable': 'disable'](); + tb.items.get('tb_download')[selections[0].get('is_readable') + && selections[0].get('is_file') ? 'show' : 'hide'](); + if (showDirs == 'folders') { + Ext.getCmp("showOrHiDirs").setText(_('ID_SHOW_DIRS')); + showDirs = 'noFolders'; + } else { + Ext.getCmp("showOrHiDirs").setText(_('ID_HIDE_DIRS')); + showDirs = 'folders'; + } + } else { + tb.items.get('tb_delete').disable(); + tb.items.get('tb_rename').disable(); + tb.items.get('tb_download').hide(); + } + return true; } @@ -1402,18 +1408,23 @@ function handleRowClick(sm, rowIndex) {//alert(rowIndex); function loadDir() { // console.info("loadDir"); // console.trace(); - itemSelected = "loadDir"; - datastore.load({ - params : { - start: 0, - limit: 100, - dir : datastore.directory, - node : datastore.directory, - option : 'gridDocuments', - action : 'expandNode', - sendWhat : datastore.sendWhat + itemSelected = "loadDir"; + datastore.load({ + params : { + start: 0, + limit: 100, + dir : datastore.directory, + node : datastore.directory, + option : 'gridDocuments', + action : 'expandNode', + sendWhat : datastore.sendWhat + } + }); + if (datastore.sendWhat == 'files') { + Ext.getCmp("showOrHiDirs").setText(_('ID_SHOW_DIRS')); + } else { + Ext.getCmp("showOrHiDirs").setText(_('ID_HIDE_DIRS')); } - }); } function rowContextMenu(grid, rowIndex, e, f) { @@ -1438,6 +1449,14 @@ function rowContextMenu(grid, rowIndex, e, f) { gridCtxMenu.items.get('gc_rename')[selections[0].get('is_deletable') ? 'disable': 'disable'](); gridCtxMenu.items.get('gc_download')[selections[0].get('is_readable') && selections[0].get('is_file') ? 'enable' : 'disable'](); + if (showDirs == 'folders') { + Ext.getCmp("showOrHiDirs").setText(_('ID_SHOW_DIRS')); + showDirs = 'noFolders'; + } else { + Ext.getCmp("showOrHiDirs").setText(_('ID_HIDE_DIRS')); + showDirs = 'folders'; + } + } gridCtxMenu.show(e.getTarget(), 'tr-br?'); From 2f8187ea0eda4088a83e58cb428ac2b5205ba569 Mon Sep 17 00:00:00 2001 From: jennylee Date: Tue, 27 May 2014 10:37:27 -0400 Subject: [PATCH 3/9] BUG-14034 Status in Dashboards -NEW FEATURE I was editing the DAS_UID to, this was generating an error. --- workflow/engine/templates/dashboard/dashletsList.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/workflow/engine/templates/dashboard/dashletsList.js b/workflow/engine/templates/dashboard/dashletsList.js index 6a2107b51..f4b11e8d2 100644 --- a/workflow/engine/templates/dashboard/dashletsList.js +++ b/workflow/engine/templates/dashboard/dashletsList.js @@ -399,11 +399,9 @@ statusDashletInstance = function(){ var data = { DAS_INS_UID: rows[i].data.DAS_INS_UID, DAS_INS_TITLE: rows[i].data.DAS_INS_TITLE, - DAS_UID: rows[i].data.DAS_INS_UID, - DAS_INS_STATUS: status, - DAS_STATUS: status + DAS_INS_STATUS: status }; - + Ext.Ajax.request({ url: 'saveDashletInstance', method: 'POST', From 7244347f476a9aae185c249985f5cb58970088a0 Mon Sep 17 00:00:00 2001 From: jennylee Date: Wed, 28 May 2014 16:57:23 -0400 Subject: [PATCH 4/9] BUG-15076 Edit StageMap Window dosen`t close. The Edit StageMap wondow dosen`t close because the menu_edit variable was undefined. So, I added a validation to control this issue. --- workflow/engine/xmlform/tracker/tracker_Configuration.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/workflow/engine/xmlform/tracker/tracker_Configuration.xml b/workflow/engine/xmlform/tracker/tracker_Configuration.xml index 59423e310..d9afa0f14 100755 --- a/workflow/engine/xmlform/tracker/tracker_Configuration.xml +++ b/workflow/engine/xmlform/tracker/tracker_Configuration.xml @@ -72,9 +72,9 @@ var editStagesMap = function(sProcessUID) { oPanel.events = { remove: function() { delete(oPanel); - if(menu_edit.maked === true){ + if(typeof menu_edit != "undefined" && menu_edit.maked === true){ menu_edit.remove(); - } else if (menu_add.maked === true) { + } else if (typeof menu_add != "undefined" && menu_add.maked === true) { menu_add.remove(); } }.extend(this) From aedd4ee002b49fe6481814ea1003f749ea82f0f2 Mon Sep 17 00:00:00 2001 From: Marco Antonio Nina Date: Thu, 29 May 2014 09:38:31 -0400 Subject: [PATCH 5/9] BUG-14980 Validacion Date en Pmtables no es respetada SOLVED - The om propel class generates a validation for null values if for the fields date/time. - A validation was added in the om propel class for null values if in the pmtable it's defined. --- .../engine/builder/om/php5/PHP5BasicObjectBuilder.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/gulliver/thirdparty/propel-generator/classes/propel/engine/builder/om/php5/PHP5BasicObjectBuilder.php b/gulliver/thirdparty/propel-generator/classes/propel/engine/builder/om/php5/PHP5BasicObjectBuilder.php index 7a656ac87..a448320c8 100755 --- a/gulliver/thirdparty/propel-generator/classes/propel/engine/builder/om/php5/PHP5BasicObjectBuilder.php +++ b/gulliver/thirdparty/propel-generator/classes/propel/engine/builder/om/php5/PHP5BasicObjectBuilder.php @@ -588,7 +588,15 @@ abstract class ".$this->getClassname()." extends ".ClassTools::classname($this-> $script .= " if (\$v !== null && !is_int(\$v)) { - \$ts = strtotime(\$v); + \$ts = strtotime(\$v);"; + if ($col->getPhpDefaultValue() != 1) { + $script .= " + //Date/time accepts null values + if (\$v == '') { + \$ts = null; + }"; + } + $script .=" if (\$ts === -1 || \$ts === false) { throw new PropelException(\"Unable to parse date/time value for [$clo] from input: \" . var_export(\$v, true)); From 342436d82f87651ff193356b634e75307c99a1f4 Mon Sep 17 00:00:00 2001 From: jennylee Date: Thu, 29 May 2014 16:49:33 -0400 Subject: [PATCH 6/9] BUG-15068 PMFPauseCase dosen`t pause the case whrn using the trigger wizzard. The validation for the not required parameter "unpauseDate" was wrong. When this parameter was empty the validation was taking this like this has a date, so it was trying to check the date format, and this was giving an error. The validation was changed to only let strings of 10 or more characters go into the next validation where the format of the date is checked. --- workflow/engine/classes/class.pmFunctions.php | 7 ++++--- workflow/engine/classes/class.wsBase.php | 8 +++----- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/workflow/engine/classes/class.pmFunctions.php b/workflow/engine/classes/class.pmFunctions.php index 1c769798a..b7d3c486d 100755 --- a/workflow/engine/classes/class.pmFunctions.php +++ b/workflow/engine/classes/class.pmFunctions.php @@ -2843,8 +2843,9 @@ function PMFAddAttachmentToArray($arrayData, $index, $value, $suffix = " Copy({i * * It delete the mask a field. * - * @name PMFAddAttachmentToArray - * + * @name PMFRemoveMask + * @label PMF Remove Mask + * * @param string | $field | Value the field * @param string | $separator | Separator of thousands (, or .) * @param string | $currency | symbol of currency @@ -2852,7 +2853,7 @@ function PMFAddAttachmentToArray($arrayData, $index, $value, $suffix = " Copy({i * */ -function PMRemoveMask ($field, $separator = '.', $currency = '') +function PMFRemoveMask ($field, $separator = '.', $currency = '') { $sep = array(); if ( trim($currency) != '') { diff --git a/workflow/engine/classes/class.wsBase.php b/workflow/engine/classes/class.wsBase.php index 9a965b85e..7f00851e3 100755 --- a/workflow/engine/classes/class.wsBase.php +++ b/workflow/engine/classes/class.wsBase.php @@ -3079,7 +3079,6 @@ class wsBase return $result; } - if (empty( $userUid )) { $result = new wsResponse( 100, G::LoadTranslation( "ID_REQUIRED_FIELD" ) . " userUid" ); @@ -3087,8 +3086,7 @@ class wsBase return $result; } - - if (! empty( $unpauseDate )) { + if( strlen($unpauseDate) >=10 ){ if (! preg_match( "/^\d{4}-\d{2}-\d{2}| \d{2}:\d{2}:\d{2}$/", $unpauseDate )) { $result = new wsResponse( 100, G::LoadTranslation( "ID_INVALID_DATA" ) . " $unpauseDate" ); @@ -3096,8 +3094,9 @@ class wsBase return $result; } + } else { + $unpauseDate = null; } - $case = new Cases(); $case->pauseCase( $caseUid, $delIndex, $userUid, $unpauseDate ); @@ -3108,7 +3107,6 @@ class wsBase ); $g->sessionVarRestore(); - return $result; } catch (Exception $e) { $result = new wsResponse(100, $e->getMessage()); From 67ef1e7d4bd94654259de17d5c568797f6682b54 Mon Sep 17 00:00:00 2001 From: Luis Fernando Saisa Lopez Date: Thu, 29 May 2014 17:01:13 -0400 Subject: [PATCH 7/9] BUG 15080 "my case forms and documents" no..." SOLVED - "my case forms and documents" no muestra el formulario. - Problema resuelto, cuando se realiza el seguimiento de un caso en "my case forms and documents" en Case Tracker, al seleccionar un dynaform de la lista el formulario se muestra correctamente. Disponible para la version 2.5.3 de ProcessMaker. --- gulliver/system/class.publisher.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/gulliver/system/class.publisher.php b/gulliver/system/class.publisher.php index 0000e8c93..40b7fc20e 100755 --- a/gulliver/system/class.publisher.php +++ b/gulliver/system/class.publisher.php @@ -293,15 +293,13 @@ class Publisher $oFieldCondition = new FieldCondition(); //This dynaform has show/hide field conditions - $dynUid = ''; if (isset($_SESSION['CURRENT_DYN_UID']) && $_SESSION['CURRENT_DYN_UID'] != '') { - $dynUid = $_SESSION['CURRENT_DYN_UID']; + $ConditionalShowHideRoutines = $oFieldCondition->getConditionScript($_SESSION["CURRENT_DYN_UID"]); //lsl } else { if (isset($_SESSION['CONDITION_DYN_UID']) && $_SESSION['CONDITION_DYN_UID'] != '') { - $dynUid = $_SESSION['CONDITION_DYN_UID']; + $ConditionalShowHideRoutines = $oFieldCondition->getConditionScript($_SESSION["CONDITION_DYN_UID"]); //lsl } } - $ConditionalShowHideRoutines = $oFieldCondition->getConditionScript($dynUid); } } From 209b6591b74d0aebf01ce73e15b15c5a9b5e3497 Mon Sep 17 00:00:00 2001 From: Julio Cesar Laura Date: Mon, 2 Jun 2014 13:35:25 -0400 Subject: [PATCH 8/9] BUG 15071 Problemas en la extension de un output con la opcion "By clicking on the generated file link=Download the file" SOLVED - Missing validation in the dropdown class - Added validation in the dropdown class to add missing option only when the field is render in view mode --- gulliver/system/class.xmlform.php | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/gulliver/system/class.xmlform.php b/gulliver/system/class.xmlform.php index cc3b2d653..8be454dc4 100755 --- a/gulliver/system/class.xmlform.php +++ b/gulliver/system/class.xmlform.php @@ -3178,17 +3178,12 @@ class XmlForm_Field_Checkbox extends XmlForm_Field $checked = (isset( $value ) && ($value == $this->value)) ? 'checked' : ''; if ($this->labelOnRight) { $html = ''; - $html = "NSFieldType() . " name='form[" . $this->name . "]' type='checkbox' $checked $readOnly disabled > + $html = "NSFieldType() . " type='checkbox' $checked $readOnly disabled /> " . $this->label . ''; } else { - $html = "NSFieldType() . " name='form[" . $this->name . "]' type='checkbox' $checked $readOnly disabled/>"; + $html = "NSFieldType() . " type='checkbox' $checked $readOnly disabled />"; } $html .= ""; - // if($this->hint){ - // $html .= ' - // - // '; - // } return $html; } } @@ -3360,11 +3355,6 @@ class XmlForm_Field_Submit extends XmlForm_Field $sLinkNextStep = 'window.location=("casesSaveDataView?UID=' . $_SESSION['CURRENT_DYN_UID'] . '");'; $html = 'NSFieldType() . ' name="form[' . $this->name . ']" type="button" value="' . G::LoadTranslation( 'ID_CONTINUE' ) . '" onclick="' . htmlentities( $sLinkNextStep, ENT_COMPAT, 'utf-8' ) . '" />'; } - - $html .= 'name . ']" '; - $html .= 'name="form[' . $this->name . ']" '; - $html .= 'type="hidden" value="' . $this->htmlentities( $this->label, ENT_QUOTES, 'utf-8' ) . '" />'; return $html; } else { return $this->htmlentities( $value, ENT_COMPAT, 'utf-8' ); @@ -3616,7 +3606,7 @@ class XmlForm_Field_Dropdown extends XmlForm_Field $html = $html . ""; } - if ($value !== $findValue) { + if ($value !== $findValue && $this->renderMode == 'view') { $html .= ""; } From 6ae64971f149db90f5123f12ff1c33ec9415ee91 Mon Sep 17 00:00:00 2001 From: Julio Cesar Laura Date: Mon, 2 Jun 2014 16:23:05 -0400 Subject: [PATCH 9/9] Merge code from github.com to bitbucket repo 2014-06-02 --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index fc83d200f..1c612271d 100644 --- a/README.md +++ b/README.md @@ -14,11 +14,11 @@ ProcessMaker "Michelangelo" Overview -------- -ProcessMaker is an open source, workflow management software suite, which +ProcessMaker is an open source, workflow management software suite, which includes tools to automate your workflow, design forms, create documents, assign roles and users, create routing rules, and map an individual process quickly and easily. It's relatively lightweight and doesn't require any kind of installation -on the client computer. This file describes the requirements and installation +on the client computer. This file describes the requirements and installation steps for the server. License @@ -32,3 +32,4 @@ http://www.affero.org/oagpl.html For further information visit: http://www.processmaker.com/ +