Merged 3.0.1.8 into MT-10
This commit is contained in:
@@ -71,8 +71,11 @@ try {
|
||||
$classLoader->add(PATH_TRUNK . 'workflow' . PATH_SEP . 'engine' . PATH_SEP . 'src' . PATH_SEP, 'ProcessMaker');
|
||||
$classLoader->add(PATH_TRUNK . 'workflow' . PATH_SEP . 'engine' . PATH_SEP . 'src' . PATH_SEP);
|
||||
|
||||
$classLoader->addModelClassPath(PATH_TRUNK . 'workflow' . PATH_SEP . 'engine' . PATH_SEP . 'classes' . PATH_SEP . 'model' . PATH_SEP);
|
||||
//Load classes
|
||||
G::LoadThirdParty('propel', 'Propel');
|
||||
G::LoadClass('system');
|
||||
G::LoadClass('tasks');
|
||||
|
||||
$arraySystemConfiguration = System::getSystemConfiguration();
|
||||
|
||||
|
||||
@@ -67,6 +67,7 @@ try {
|
||||
//Load classes
|
||||
G::LoadThirdParty('pear/json', 'class.json');
|
||||
G::LoadThirdParty('smarty/libs', 'Smarty.class');
|
||||
G::LoadThirdParty('propel', 'Propel');
|
||||
G::LoadSystem('error');
|
||||
G::LoadSystem('dbconnection');
|
||||
G::LoadSystem('dbsession');
|
||||
@@ -86,6 +87,7 @@ try {
|
||||
G::LoadSystem('pagedTable');
|
||||
G::LoadSystem('httpProxyController');
|
||||
G::LoadClass('system');
|
||||
G::LoadClass('tasks');
|
||||
|
||||
require_once('propel/Propel.php');
|
||||
require_once('creole/Creole.php');
|
||||
|
||||
@@ -1560,8 +1560,8 @@ class Cases
|
||||
$pausedTask[] = $row;
|
||||
}
|
||||
|
||||
if (count($pausedTask) == 0) {
|
||||
return false; // return false because there is not any delegation for this task.
|
||||
if (count($pausedTask) === 0) {
|
||||
return array(); // return false because there is not any delegation for this task.
|
||||
} else {
|
||||
return array('pause' => $pausedTask);
|
||||
}
|
||||
|
||||
@@ -1129,8 +1129,12 @@ class Derivation
|
||||
switch ($routeType) {
|
||||
case "SEC-JOIN":
|
||||
$arrayOpenThread = ($flagTaskIsMultipleInstance && $flagTaskAssignTypeIsMultipleInstance)? $this->case->searchOpenPreviousTasks($currentDelegation["TAS_UID"], $currentDelegation["APP_UID"]) : array();
|
||||
$arrayOpenThread = array_merge($arrayOpenThread, $this->case->getOpenSiblingThreads($nextDel["TAS_UID"], $currentDelegation["APP_UID"], $currentDelegation["DEL_INDEX"], $currentDelegation["TAS_UID"]));
|
||||
$arraySiblings = $this->case->getOpenSiblingThreads($nextDel["TAS_UID"], $currentDelegation["APP_UID"], $currentDelegation["DEL_INDEX"], $currentDelegation["TAS_UID"]);
|
||||
if(is_array($arrayOpenThread) && is_array($arraySiblings)){
|
||||
$arrayOpenThread = array_merge($arrayOpenThread, $arraySiblings);
|
||||
}
|
||||
$canDerivate = empty($arrayOpenThread);
|
||||
|
||||
break;
|
||||
default:
|
||||
$canDerivate = true;
|
||||
|
||||
@@ -365,6 +365,60 @@ class Triggers extends BaseTriggers
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Process elements:
|
||||
*
|
||||
* PRO_TRI_DELETED
|
||||
* PRO_TRI_CANCELED
|
||||
* PRO_TRI_PAUSED
|
||||
* PRO_TRI_REASSIGNED
|
||||
* PRO_TRI_OPEN
|
||||
*/
|
||||
$criteria = new Criteria();
|
||||
|
||||
$crit0 = $criteria->getNewCriterion(ProcessPeer::PRO_TRI_DELETED, $TRI_UID);
|
||||
$crit1 = $criteria->getNewCriterion(ProcessPeer::PRO_TRI_CANCELED, $TRI_UID);
|
||||
$crit2 = $criteria->getNewCriterion(ProcessPeer::PRO_TRI_PAUSED, $TRI_UID);
|
||||
$crit3 = $criteria->getNewCriterion(ProcessPeer::PRO_TRI_REASSIGNED, $TRI_UID);
|
||||
$crit4 = $criteria->getNewCriterion(ProcessPeer::PRO_TRI_OPEN, $TRI_UID);
|
||||
|
||||
$crit0->addOr($crit1);
|
||||
$crit0->addOr($crit2);
|
||||
$crit0->addOr($crit3);
|
||||
$crit0->addOr($crit4);
|
||||
|
||||
$criteria->addSelectColumn(ProcessPeer::PRO_UID);
|
||||
$criteria->addSelectColumn(ProcessPeer::PRO_TRI_DELETED);
|
||||
$criteria->addSelectColumn(ProcessPeer::PRO_TRI_CANCELED);
|
||||
$criteria->addSelectColumn(ProcessPeer::PRO_TRI_PAUSED);
|
||||
$criteria->addSelectColumn(ProcessPeer::PRO_TRI_REASSIGNED);
|
||||
$criteria->addSelectColumn(ProcessPeer::PRO_TRI_OPEN);
|
||||
$criteria->add($crit0);
|
||||
|
||||
$rsCriteria = ProcessPeer::doSelectRS($criteria);
|
||||
$rsCriteria->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
|
||||
$arrayRow = array();
|
||||
|
||||
while ($rsCriteria->next()) {
|
||||
array_push($arrayRow, $rsCriteria->getRow());
|
||||
}
|
||||
|
||||
$oResult->dependencies["Process"] = array();
|
||||
|
||||
if ($oResult->code == 0 && count($arrayRow) == 0) {
|
||||
$oResult->code = 0;
|
||||
} else {
|
||||
if (count($arrayRow) > 0) {
|
||||
foreach ($arrayRow as $row) {
|
||||
$process = ProcessPeer::retrieveByPK($row["PRO_UID"]);
|
||||
array_push($oResult->dependencies["Process"], array("UID" => $process->getProUid(), "DESCRIPTION" => $process->getProTitle()));
|
||||
}
|
||||
|
||||
$oResult->code = 1;
|
||||
}
|
||||
}
|
||||
|
||||
return $oResult;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -426,12 +426,27 @@ class Home extends Controller
|
||||
$dataList['dir'] = $dir;
|
||||
$dataList['sort'] = $sort;
|
||||
$dataList['category'] = $category;
|
||||
$dataList['action'] = $type;
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if (true) {
|
||||
//In enterprise version this block of code should always be executed
|
||||
//In community version this block of code is deleted and is executed the other
|
||||
$list = new \ProcessMaker\BusinessModel\Lists();
|
||||
$cases = $list->getList('inbox', $dataList);
|
||||
$listName = 'inbox';
|
||||
switch ($type) {
|
||||
case 'draft':
|
||||
case 'todo':
|
||||
$listName = 'inbox';
|
||||
$cases = $list->getList($listName, $dataList);
|
||||
break;
|
||||
case 'unassigned':
|
||||
$case = new \ProcessMaker\BusinessModel\Cases();
|
||||
$cases = $case->getList($dataList);
|
||||
foreach ($cases['data'] as &$value) {
|
||||
$value = array_change_key_case($value, CASE_UPPER);
|
||||
}
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$case = new \ProcessMaker\BusinessModel\Cases();
|
||||
@@ -439,14 +454,14 @@ class Home extends Controller
|
||||
foreach ($cases['data'] as &$value) {
|
||||
$value = array_change_key_case($value, CASE_UPPER);
|
||||
}
|
||||
if(!isset($cases['totalCount'])){
|
||||
$cases['totalCount'] = $cases['total'];
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
}
|
||||
if(!isset($cases['totalCount'])){
|
||||
$cases['totalCount'] = $cases['total'];
|
||||
}
|
||||
|
||||
// formating & complitting apps data with 'Notes'
|
||||
foreach ($cases['data'] as $i => $row) {
|
||||
|
||||
@@ -37,7 +37,6 @@ switch ($_SESSION['actionCaseOptions']) {
|
||||
break;
|
||||
case 'sent':
|
||||
case 'unassigned':
|
||||
$_SESSION['TASK'] = -1;
|
||||
$statusSendAndUnassigned = true;
|
||||
break;
|
||||
case 'paused':
|
||||
@@ -46,8 +45,6 @@ switch ($_SESSION['actionCaseOptions']) {
|
||||
if (isset($_SESSION['bNoShowSteps'])) {
|
||||
unset($_SESSION['bNoShowSteps']);
|
||||
}
|
||||
} else {
|
||||
$_SESSION['TASK'] = -1;
|
||||
}
|
||||
break;
|
||||
case 'to_revise':
|
||||
@@ -57,8 +54,6 @@ switch ($_SESSION['actionCaseOptions']) {
|
||||
if (isset($_SESSION['bNoShowSteps'])) {
|
||||
unset($_SESSION['bNoShowSteps']);
|
||||
}
|
||||
} else {
|
||||
$_SESSION['TASK'] = -1;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -560,7 +560,7 @@ switch (($_POST['action']) ? $_POST['action'] : $_REQUEST['action']) {
|
||||
$oCase = new Cases();
|
||||
$aProcesses = Array ();
|
||||
$G_PUBLISH = new Publisher();
|
||||
$c = $oCase->getAllUploadedDocumentsCriteria( $_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['TASK'], $_SESSION['USER_LOGGED'] );
|
||||
$c = $oCase->getAllUploadedDocumentsCriteria( $_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['CURRENT_TASK'], $_SESSION['USER_LOGGED'] );
|
||||
|
||||
if ($c->getDbName() == 'dbarray') {
|
||||
$rs = ArrayBasePeer::doSelectRs( $c );
|
||||
@@ -597,7 +597,7 @@ switch (($_POST['action']) ? $_POST['action'] : $_REQUEST['action']) {
|
||||
$oCase = new Cases();
|
||||
$aProcesses = Array ();
|
||||
$G_PUBLISH = new Publisher();
|
||||
$c = $oCase->getAllGeneratedDocumentsCriteria( $_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['TASK'], $_SESSION['USER_LOGGED'] );
|
||||
$c = $oCase->getAllGeneratedDocumentsCriteria( $_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['CURRENT_TASK'], $_SESSION['USER_LOGGED'] );
|
||||
|
||||
if ($c->getDbName() == 'dbarray') {
|
||||
$rs = ArrayBasePeer::doSelectRs( $c );
|
||||
|
||||
@@ -194,6 +194,19 @@ class InputDocument
|
||||
$arrayData[] = \G::LoadTranslation("ID_PROCESS_PERMISSIONS");
|
||||
}
|
||||
|
||||
//Variables
|
||||
$criteria = new \Criteria("workflow");
|
||||
|
||||
$criteria->addSelectColumn(\ProcessVariablesPeer::VAR_UID);
|
||||
$criteria->add(\ProcessVariablesPeer::INP_DOC_UID, $inputDocumentUid);
|
||||
|
||||
$rsCriteria = \ProcessVariablesPeer::doSelectRS($criteria);
|
||||
|
||||
if ($rsCriteria->next()) {
|
||||
$flagAssigned = true;
|
||||
$arrayData[] = \G::LoadTranslation("ID_VARIABLES");
|
||||
}
|
||||
|
||||
//Return
|
||||
return array($flagAssigned, $arrayData);
|
||||
} catch (\Exception $e) {
|
||||
|
||||
@@ -538,20 +538,42 @@ class Process
|
||||
|
||||
$trigger = new \ProcessMaker\BusinessModel\Trigger();
|
||||
|
||||
/**
|
||||
* Try catch block is added to escape the exception and continue editing
|
||||
* the properties of the process, otherwise there is no way to edit
|
||||
* the properties that the exception is thrown: trigger nonexistent.
|
||||
* The same goes for the similar blocks.
|
||||
*/
|
||||
if (isset($arrayData["PRO_TRI_DELETED"]) && $arrayData["PRO_TRI_DELETED"] . "" != "") {
|
||||
$trigger->throwExceptionIfNotExistsTrigger($arrayData["PRO_TRI_DELETED"], $processUid, $this->arrayFieldNameForException["processTriDeleted"]);
|
||||
try {
|
||||
$trigger->throwExceptionIfNotExistsTrigger($arrayData["PRO_TRI_DELETED"], $processUid, $this->arrayFieldNameForException["processTriDeleted"]);
|
||||
} catch (\Exception $e) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($arrayData["PRO_TRI_CANCELED"]) && $arrayData["PRO_TRI_CANCELED"] . "" != "") {
|
||||
$trigger->throwExceptionIfNotExistsTrigger($arrayData["PRO_TRI_CANCELED"], $processUid, $this->arrayFieldNameForException["processTriCanceled"]);
|
||||
try {
|
||||
$trigger->throwExceptionIfNotExistsTrigger($arrayData["PRO_TRI_CANCELED"], $processUid, $this->arrayFieldNameForException["processTriCanceled"]);
|
||||
} catch (\Exception $e) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($arrayData["PRO_TRI_PAUSED"]) && $arrayData["PRO_TRI_PAUSED"] . "" != "") {
|
||||
$trigger->throwExceptionIfNotExistsTrigger($arrayData["PRO_TRI_PAUSED"], $processUid, $this->arrayFieldNameForException["processTriPaused"]);
|
||||
try {
|
||||
$trigger->throwExceptionIfNotExistsTrigger($arrayData["PRO_TRI_PAUSED"], $processUid, $this->arrayFieldNameForException["processTriPaused"]);
|
||||
} catch (\Exception $e) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($arrayData["PRO_TRI_REASSIGNED"]) && $arrayData["PRO_TRI_REASSIGNED"] . "" != "") {
|
||||
$trigger->throwExceptionIfNotExistsTrigger($arrayData["PRO_TRI_REASSIGNED"], $processUid, $this->arrayFieldNameForException["processTriReassigned"]);
|
||||
try {
|
||||
$trigger->throwExceptionIfNotExistsTrigger($arrayData["PRO_TRI_REASSIGNED"], $processUid, $this->arrayFieldNameForException["processTriReassigned"]);
|
||||
} catch (\Exception $e) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($arrayData["PRO_PARENT"])) {
|
||||
|
||||
@@ -715,6 +715,28 @@ class Light extends Api
|
||||
return $response;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Already Route
|
||||
*
|
||||
* @param string $app_uid {@min 1}{@max 32}
|
||||
* @param int $cas_index
|
||||
*
|
||||
* @status 204
|
||||
* @url GET /case/:app_uid/:cas_index
|
||||
*/
|
||||
public function doIfAlreadyRoute($app_uid, $cas_index)
|
||||
{
|
||||
try {
|
||||
$oAppDelegate = new \AppDelegation();
|
||||
$alreadyRouted = $oAppDelegate->alreadyRouted($app_uid, $cas_index);
|
||||
if ($alreadyRouted) {
|
||||
throw (new RestException(Api::STAT_APP_EXCEPTION, G::LoadTranslation('ID_CASE_DELEGATION_ALREADY_CLOSED')));
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @url GET /project/:prj_uid/dynaforms
|
||||
|
||||
@@ -543,6 +543,8 @@ Ext.onReady( function() {
|
||||
iconCls: 'icon-user-add',
|
||||
text: _('ID_ADD'),
|
||||
handler: function(){
|
||||
Ext.getCmp('startdt').setMaxValue(0);
|
||||
Ext.getCmp('enddt').setMinValue(0);
|
||||
var e = new EmployeeHoliday({
|
||||
name: '',
|
||||
startdt: (new Date()).clearTime(),
|
||||
|
||||
@@ -35,6 +35,7 @@ itemSelected = "";
|
||||
lastDir = "";
|
||||
var conn = new Ext.data.Connection();
|
||||
var showDirs = 'noFolders';
|
||||
var pageSize = 25;
|
||||
|
||||
streamFilefromPM=function(fileStream) {
|
||||
Ext.Ajax.request({
|
||||
@@ -106,7 +107,7 @@ function chDir( directory, loadGridOnly ) {
|
||||
datastore.load({
|
||||
params:{
|
||||
start: 0,
|
||||
limit: 100,
|
||||
limit: pageSize,
|
||||
dir: directory,
|
||||
node: directory,
|
||||
option:'gridDocuments',
|
||||
@@ -284,6 +285,8 @@ function openActionDialog(caller, action, dataAux)
|
||||
return false;
|
||||
}
|
||||
|
||||
Ext.Ajax.timeout = 300000;
|
||||
|
||||
switch( action ) {
|
||||
case 'copyAction':
|
||||
case 'edit':
|
||||
@@ -788,7 +791,7 @@ var datastore = new Ext.data.Store({
|
||||
directory : "/",
|
||||
params : {
|
||||
start: 0,
|
||||
limit: 100,
|
||||
limit: pageSize,
|
||||
dir : this.directory,
|
||||
node : this.directory,
|
||||
option : "gridDocuments",
|
||||
@@ -1158,7 +1161,7 @@ var gridtb = new Ext.Toolbar(
|
||||
datastore.clearFilter();
|
||||
Ext.getCmp("filterField").setValue("");
|
||||
datastore.setBaseParam( 'search', '');
|
||||
datastore.load({params:{ start : 0 , limit : 100 }});
|
||||
datastore.load({params:{ start : 0 , limit : pageSize }});
|
||||
}
|
||||
})
|
||||
|
||||
@@ -1166,12 +1169,12 @@ var gridtb = new Ext.Toolbar(
|
||||
function filterDataStore(btn, e) {
|
||||
var filterVal = Ext.getCmp("filterField").getValue();
|
||||
datastore.setBaseParam( 'search', filterVal);
|
||||
datastore.load({params:{ start : 0 , limit : 100 }});
|
||||
datastore.load({params:{ start : 0 , limit : pageSize }});
|
||||
}
|
||||
// add a paging toolbar to the grid's footer
|
||||
var gridbb = new Ext.PagingToolbar({
|
||||
store: datastore,
|
||||
pageSize: 100,
|
||||
pageSize: pageSize,
|
||||
displayInfo: true,
|
||||
displayMsg: _("ID_DISPLAY_TOTAL"),
|
||||
emptyMsg: _("ID_DISPLAY_EMPTY"),
|
||||
@@ -1412,7 +1415,7 @@ function loadDir() {
|
||||
datastore.load({
|
||||
params : {
|
||||
start: 0,
|
||||
limit: 100,
|
||||
limit: pageSize,
|
||||
dir : datastore.directory,
|
||||
node : datastore.directory,
|
||||
option : 'gridDocuments',
|
||||
|
||||
@@ -1315,7 +1315,7 @@ importProcessExistGroup = function()
|
||||
shortGroupList = affectedGroups;
|
||||
}
|
||||
|
||||
var processFileTypeTitle = (processFileType == "pm") ? "" : " " + processFileType;
|
||||
var processFileTypeTitle = (importProcessGlobal.processFileType == "pm") ? "" : " " + importProcessGlobal.processFileType;
|
||||
|
||||
proFileName = importProcessGlobal.proFileName;
|
||||
groupBeforeAccion = importProcessGlobal.groupBeforeAccion;
|
||||
@@ -1529,7 +1529,7 @@ affectedGroupsList = function()
|
||||
importProcessExistProcess = function()
|
||||
{
|
||||
|
||||
var processFileTypeTitle = (processFileType == "pm") ? "" : " " + processFileType;
|
||||
var processFileTypeTitle = (importProcessGlobal.processFileType == "pm") ? "" : " " + importProcessGlobal.processFileType;
|
||||
var processFileType = importProcessGlobal.processFileType;
|
||||
var proFileName = importProcessGlobal.proFileName;
|
||||
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
<TITLE type="title">
|
||||
<en><![CDATA[I forgot my password]]></en>
|
||||
</TITLE>
|
||||
<USR_USERNAME type="text" size="30" maxlength="50" required="true" validate="Any" autocomplete="0">
|
||||
<USR_USERNAME type="text" size="30" maxlength="100" required="true" validate="Any" autocomplete="0">
|
||||
<en><![CDATA[User]]></en>
|
||||
</USR_USERNAME>
|
||||
<USR_EMAIL type="text" size="30" required="true" maxlength="32" autocomplete="0">
|
||||
<USR_EMAIL type="text" size="30" required="true" maxlength="100" autocomplete="0">
|
||||
<en><![CDATA[Email]]></en>
|
||||
</USR_EMAIL>
|
||||
<URL type="hidden"/>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<TITLE type="title">
|
||||
<en><![CDATA[I forgot my password]]></en>
|
||||
</TITLE>
|
||||
<USR_USERNAME type="text" size="30" maxlength="50" required="true" validate="Any" autocomplete="0">
|
||||
<USR_USERNAME type="text" size="30" maxlength="100" required="true" validate="Any" autocomplete="0">
|
||||
<en><![CDATA[User]]></en>
|
||||
</USR_USERNAME>
|
||||
<USR_EMAIL type="text" size="30" required="true" maxlength="100" autocomplete="0">
|
||||
|
||||
Reference in New Issue
Block a user