Merge branch 'develop' of bitbucket.org:colosa/processmaker into develop
This commit is contained in:
@@ -246,7 +246,17 @@ class Ajax
|
||||
|| in_array($appUid, $userAuthorization['objectPermissions']['REASSIGN_MY_CASES'])
|
||||
) {
|
||||
if (!AppDelay::isPaused($appUid, $index)) {
|
||||
$options[] = ['text' => G::LoadTranslation('ID_REASSIGN'), 'fn' => 'getUsersToReassign'];
|
||||
$subprocess = SubProcess::getSubProcessConfiguration(
|
||||
$proUid,
|
||||
$_SESSION['CURRENT_TASK']
|
||||
);
|
||||
if (empty($subprocess)) {
|
||||
$options[] = ['text' => G::LoadTranslation('ID_REASSIGN'), 'fn' => 'getUsersToReassign'];
|
||||
} else {
|
||||
if ($subprocess['SP_SYNCHRONOUS'] == 0) {
|
||||
$options[] = ['text' => G::LoadTranslation('ID_REASSIGN'), 'fn' => 'getUsersToReassign'];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -48,7 +48,7 @@ if ($actionAjax == 'historyDynaformGrid_Ajax') {
|
||||
$c = $oCase->getallDynaformsCriteria(
|
||||
$_SESSION['PROCESS'],
|
||||
$_SESSION['APPLICATION'],
|
||||
$_SESSION['CURRENT_TASK'],
|
||||
$_SESSION['TASK'],
|
||||
$_SESSION['USER_LOGGED'],
|
||||
$_SESSION['INDEX']
|
||||
);
|
||||
|
||||
@@ -1053,7 +1053,7 @@ try {
|
||||
// Swap temporary APP_NUMBER
|
||||
$newAppNumber = $bmWebEntry->swapTemporaryAppNumber($caseId);
|
||||
$Fields['APP_NUMBER'] = $Fields['APP_DATA']['APP_NUMBER'] = $newAppNumber;
|
||||
$derivationResponse = PMFDerivateCase($caseId, $delIndex, true);
|
||||
$derivationResponse = PMFDerivateCase($caseId, $delIndex, false);
|
||||
if ($derivationResponse) {
|
||||
$webEntryUrl = $bmWebEntry->getCallbackUrlByTask($currentTask['TAS_UID']);
|
||||
$delegationData = $Fields['APP_DATA'];
|
||||
|
||||
@@ -136,7 +136,8 @@ $pmDynaform = new PmDynaform();
|
||||
ScriptVariables::add('defaultOption', $defaultOption);
|
||||
ScriptVariables::add('_nodeId', isset($confDefaultOption) ? $confDefaultOption : "PM_USERS");
|
||||
ScriptVariables::add('SYS_CREDENTIALS', $pmDynaform->getCredentials());
|
||||
ScriptVariables::add('SYS_SERVER', System::getHttpServerHostnameRequestsFrontEnd());
|
||||
ScriptVariables::add('SYS_SERVER_API', System::getHttpServerHostnameRequestsFrontEnd());
|
||||
ScriptVariables::add('SYS_SERVER_AJAX', System::getServerProtocolHost());
|
||||
ScriptVariables::add('SYS_WORKSPACE', config("system.workspace"));
|
||||
ScriptVariables::add('SYS_URI', SYS_URI);
|
||||
ScriptVariables::add('SYS_LANG', SYS_LANG);
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
<?php
|
||||
|
||||
use ProcessMaker\Model\Delegation;
|
||||
use ProcessMaker\Model\SubProcess;
|
||||
|
||||
/**
|
||||
* processes_DeleteCases.php
|
||||
*
|
||||
@@ -14,6 +18,15 @@ try {
|
||||
$uids = explode(',', $_POST['PRO_UIDS']);
|
||||
$process = new Process();
|
||||
foreach ($uids as $uid) {
|
||||
$parents = SubProcess::getProParents($uid);
|
||||
if (!empty($parents)) {
|
||||
if (Delegation::hasActiveParentsCases($parents)) {
|
||||
$resp->status = false;
|
||||
$resp->msg = G::LoadTranslation('ID_CANT_DELETE_SUB_PROCESS_PARENT_HAS_ACTIVE_CASES');
|
||||
echo G::json_encode($resp);
|
||||
die();
|
||||
}
|
||||
}
|
||||
$process->deleteProcessCases($uid);
|
||||
}
|
||||
|
||||
@@ -21,11 +34,9 @@ try {
|
||||
$resp->msg = G::LoadTranslation('ID_ALL_RECORDS_DELETED_SUCESSFULLY');
|
||||
|
||||
echo G::json_encode($resp);
|
||||
|
||||
} catch (Exception $e) {
|
||||
$resp->status = false;
|
||||
$resp->msg = $e->getMessage();
|
||||
$resp->trace = $e->getTraceAsString();
|
||||
echo G::json_encode($resp);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user