From 66ca1ab983934f5f462b90aa0e8b872d0606b321 Mon Sep 17 00:00:00 2001 From: marcelo Date: Tue, 3 Feb 2015 16:26:25 -0400 Subject: [PATCH 1/2] El bugs es PM-1145 no recibia el parametro correspondiente a la variable del calendar. PM-1131, mejora en las etiquetas PM-1145, Se lo resolvio creando la variable faltante. --- workflow/engine/classes/class.pmFunctions.php | 2 +- workflow/engine/methods/users/usersAjax.php | 2 +- workflow/engine/templates/users/users.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/workflow/engine/classes/class.pmFunctions.php b/workflow/engine/classes/class.pmFunctions.php index b4b0229df..9b249db8a 100755 --- a/workflow/engine/classes/class.pmFunctions.php +++ b/workflow/engine/classes/class.pmFunctions.php @@ -2816,7 +2816,7 @@ function PMFAddCaseNote($caseUid, $processUid, $taskUid, $userUid, $note, $sendM * @return array | $arrayData | Array with new data | The array will contain the new data * */ - + function PMFAddAttachmentToArray($arrayData, $index, $value, $suffix = " Copy({i})") { if (isset($suffix) && $suffix == "") { diff --git a/workflow/engine/methods/users/usersAjax.php b/workflow/engine/methods/users/usersAjax.php index feaf49560..ce997aa41 100755 --- a/workflow/engine/methods/users/usersAjax.php +++ b/workflow/engine/methods/users/usersAjax.php @@ -83,7 +83,7 @@ switch ($_POST['action']) { $aUserInfo[] = array('USR_UID' => $aRow1['USR_UID'], 'USER_FULLNAME' => $infoUser); } print (G::json_encode($aUserInfo)); - + break; case 'availableCalendars': G::LoadClass('calendar'); diff --git a/workflow/engine/templates/users/users.js b/workflow/engine/templates/users/users.js index fab7c797a..4b85d0225 100755 --- a/workflow/engine/templates/users/users.js +++ b/workflow/engine/templates/users/users.js @@ -1,6 +1,6 @@ var storeCountry; var storeRegion; -var storeLocation; +var storeLocation; var storeReplacedBy; var storeCalendar; var storeRole; From 78c0d75522a9af3ec0e08ef4f0eea091c27da1f3 Mon Sep 17 00:00:00 2001 From: "marcelo.cuiza" Date: Tue, 3 Feb 2015 17:31:20 -0400 Subject: [PATCH 2/2] PM-1145, PM-1131 PM-1445, No se muestra el calendario que esta usando un usuario. PM-1131, actualizacion de etiquetas en trigger wizard PM-1445, se agrego el parametro CALENDAR_NAME en usersAjax.php y se recibio el mismo en users.js --- workflow/engine/classes/class.pmFunctions.php | 18 +++++++++--------- workflow/engine/methods/users/usersAjax.php | 1 + workflow/engine/templates/users/users.js | 2 ++ 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/workflow/engine/classes/class.pmFunctions.php b/workflow/engine/classes/class.pmFunctions.php index 9b249db8a..949a8a034 100755 --- a/workflow/engine/classes/class.pmFunctions.php +++ b/workflow/engine/classes/class.pmFunctions.php @@ -2803,20 +2803,20 @@ function PMFAddCaseNote($caseUid, $processUid, $taskUid, $userUid, $note, $sendM /** *@method * - * It adds an element to the asociative array of attached documents that will be sent by mail, if it exists a file with the same name, it wll return a generated name with an autoincrementable sequential number. + * Adds a filename and file path to an associative array of files which can be passed to the PMFSendMessage() to send emails with attachments. It renames files with the same filename so existing files will not be replaced in the array. * * @name PMFAddAttachmentToArray - * @label Add Element in Array - * @link http://wiki.processmaker.com/index.php/ProcessMaker_Functions#arrayDocumentAddElement.28.29 + * @label Add File to Array + * @link http://wiki.processmaker.com/index.php/ProcessMaker_Functions#PMFAddAttachmentToArray.28.29 * - * @param array | $arrayData | Array that will contain new data | Array value comes where will contain the new data. - * @param string(32) | $index | Name of the index | New index name - * @param string(32) | $value | Index value | New value will contain the index - * @param string | $suffix = " Copy({i})" | Is suffix | A string that is concatenated to index different - * @return array | $arrayData | Array with new data | The array will contain the new data + * @param array | $arrayData | Array of files | Associative array where the index of each element is its new filename and its value is the path to the file or its web address. + * @param string(32) | $index | Filename | New filename which will be added as the index in the array + * @param string(32) | $value | File location | The web address or path on the ProcessMaker server for the file + * @param string | $suffix = " Copy({i})" | Filename suffix | A suffix to add to the filename if the filename already exists in the array + * @return array | $arrayData | Array with new data | The array with the added file * */ - + function PMFAddAttachmentToArray($arrayData, $index, $value, $suffix = " Copy({i})") { if (isset($suffix) && $suffix == "") { diff --git a/workflow/engine/methods/users/usersAjax.php b/workflow/engine/methods/users/usersAjax.php index ce997aa41..0feb3c8db 100755 --- a/workflow/engine/methods/users/usersAjax.php +++ b/workflow/engine/methods/users/usersAjax.php @@ -453,6 +453,7 @@ switch ($_POST['action']) { $calendarInfo = $calendar->getCalendarFor($_POST['USR_UID'], $_POST['USR_UID'], $_POST['USR_UID']); //If the function returns a DEFAULT calendar it means that this object doesn't have assigned any calendar $aFields['USR_CALENDAR'] = $calendarInfo['CALENDAR_APPLIED'] != 'DEFAULT' ? $calendarInfo['CALENDAR_UID'] : ""; + $aFields['CALENDAR_NAME'] = $calendarInfo['CALENDAR_NAME']; #verifying if it has any preferences on the configurations table G::loadClass('configuration'); diff --git a/workflow/engine/templates/users/users.js b/workflow/engine/templates/users/users.js index 4b85d0225..3cc33532c 100755 --- a/workflow/engine/templates/users/users.js +++ b/workflow/engine/templates/users/users.js @@ -1313,6 +1313,8 @@ function loadUserData() Ext.getCmp("USR_DUE_DATE2").setText(data.user.USR_DUE_DATE); Ext.getCmp("USR_STATUS2").setText(_('ID_' + data.user.USR_STATUS)); Ext.getCmp("USR_ROLE2").setText(data.user.USR_ROLE_NAME); + + Ext.getCmp("USR_CALENDAR2").setText(data.user.CALENDAR_NAME); Ext.getCmp("PREF_DEFAULT_MAIN_MENU_OPTION2").setText(data.user.MENUSELECTED_NAME); Ext.getCmp("PREF_DEFAULT_CASES_MENUSELECTED2").setText(data.user.CASES_MENUSELECTED_NAME);