PMCORE-1387
This commit is contained in:
@@ -7,7 +7,6 @@ use Faker\Generator as Faker;
|
||||
$factory->define(\ProcessMaker\Model\Groupwf::class, function(Faker $faker) {
|
||||
return [
|
||||
'GRP_UID' => G::generateUniqueID(),
|
||||
//'GRP_ID' The incremental fields of the tables must not be specified in the creation list.
|
||||
'GRP_TITLE' => $faker->sentence(2),
|
||||
'GRP_STATUS' => 'ACTIVE',
|
||||
'GRP_LDAP_DN' => '',
|
||||
|
||||
@@ -9,7 +9,6 @@ $factory->define(\ProcessMaker\Model\Process::class, function(Faker $faker) {
|
||||
//The incremental fields of the tables must not be specified in the creation list.
|
||||
return [
|
||||
'PRO_UID' => G::generateUniqueID(),
|
||||
//'PRO_ID' The incremental fields of the tables must not be specified in the creation list.
|
||||
'PRO_TITLE' => $faker->sentence(3),
|
||||
'PRO_DESCRIPTION' => $faker->paragraph(3),
|
||||
'PRO_CREATE_USER' => '00000000000000000000000000000001',
|
||||
@@ -31,7 +30,6 @@ $factory->state(\ProcessMaker\Model\Process::class, 'foreign_keys', function (Fa
|
||||
$user = factory(\ProcessMaker\Model\User::class)->create();
|
||||
return [
|
||||
'PRO_UID' => G::generateUniqueID(),
|
||||
//'PRO_ID' The incremental fields of the tables must not be specified in the creation list.
|
||||
'PRO_TITLE' => $faker->sentence(3),
|
||||
'PRO_DESCRIPTION' => $faker->paragraph(3),
|
||||
'PRO_CREATE_USER' => $user->USR_UID,
|
||||
@@ -52,7 +50,6 @@ $factory->state(\ProcessMaker\Model\Process::class, 'flow', function (Faker $fak
|
||||
$user = factory(\ProcessMaker\Model\User::class)->create();
|
||||
$process = [
|
||||
'PRO_UID' => G::generateUniqueID(),
|
||||
//'PRO_ID' The incremental fields of the tables must not be specified in the creation list.
|
||||
'PRO_TITLE' => $faker->sentence(3),
|
||||
'PRO_DESCRIPTION' => $faker->paragraph(3),
|
||||
'PRO_CREATE_USER' => $user->USR_UID,
|
||||
|
||||
@@ -11,7 +11,6 @@ $factory->define(\ProcessMaker\Model\Task::class, function(Faker $faker) {
|
||||
'PRO_UID' => $process->PRO_UID,
|
||||
'PRO_ID' => $process->PRO_ID,
|
||||
'TAS_UID' => G::generateUniqueID(),
|
||||
//'TAS_ID' The incremental fields of the tables must not be specified in the creation list.
|
||||
'TAS_TITLE' => $faker->sentence(2),
|
||||
'TAS_TYPE' => 'NORMAL',
|
||||
'TAS_TYPE_DAY' => 1,
|
||||
@@ -40,7 +39,6 @@ $factory->state(\ProcessMaker\Model\Task::class, 'foreign_keys', function (Faker
|
||||
'PRO_UID' => $process->PRO_UID,
|
||||
'PRO_ID' => $process->PRO_ID,
|
||||
'TAS_UID' => G::generateUniqueID(),
|
||||
//'TAS_ID' The incremental fields of the tables must not be specified in the creation list.
|
||||
'TAS_TITLE' => $faker->sentence(2),
|
||||
'TAS_TYPE' => 'NORMAL',
|
||||
'TAS_TYPE_DAY' => 1,
|
||||
|
||||
@@ -1416,7 +1416,7 @@ class Derivation
|
||||
protected function subProcessCreation(array $subProcessInfo, array $appFields, array $currentDelegation, $delIndex, $threadIndex)
|
||||
{
|
||||
// Check if is SelfService the task in the SubProcess
|
||||
$isSelfService = (empty($subProcessInfo['USR_UID'])) ? true : false;
|
||||
$isSelfService = empty($subProcessInfo['USR_UID']) ? true : false;
|
||||
|
||||
// Create the new case in the sub-process
|
||||
// Set the initial date to null the time its created
|
||||
|
||||
@@ -114,18 +114,19 @@ try {
|
||||
|
||||
$debuggerAvailable = true;
|
||||
$casesRedirector = 'casesListExtJsRedirector';
|
||||
$nextStep = [];
|
||||
if (isset($_SESSION['user_experience']) && $flagGmail === false) {
|
||||
$aNextStep ['PAGE'] = $casesRedirector . '?ux=' . $_SESSION ['user_experience'];
|
||||
$nextStep['PAGE'] = $casesRedirector . '?ux=' . $_SESSION['user_experience'];
|
||||
$debuggerAvailable = false;
|
||||
} else {
|
||||
if ($flagGmail === true) {
|
||||
$aNextStep ['PAGE'] = $casesRedirector . '?gmail=1';
|
||||
$nextStep['PAGE'] = $casesRedirector . '?gmail=1';
|
||||
} else {
|
||||
$aNextStep ['PAGE'] = $casesRedirector;
|
||||
$nextStep['PAGE'] = $casesRedirector;
|
||||
}
|
||||
}
|
||||
|
||||
$loc = $aNextStep['PAGE'];
|
||||
$loc = $nextStep['PAGE'];
|
||||
|
||||
//Triggers After
|
||||
$isIE = Bootstrap::isIE();
|
||||
|
||||
@@ -139,27 +139,27 @@ trait CasesTrait
|
||||
$this->updateCase($application, $appFields);
|
||||
|
||||
// Send notifications - Start
|
||||
$oUser = new Users();
|
||||
$aUser = $oUser->load($userLogged);
|
||||
$fromName = $aUser['USR_FIRSTNAME'] . ' ' . $aUser['USR_LASTNAME'];
|
||||
$user = new Users();
|
||||
$userInfo = $user->load($userLogged);
|
||||
$fromName = $userInfo['USR_FIRSTNAME'] . ' ' . $userInfo['USR_LASTNAME'];
|
||||
|
||||
$sFromData = $fromName . ($aUser['USR_EMAIL'] != '' ? ' <' . $aUser['USR_EMAIL'] . '>' : '');
|
||||
$fromData = $fromName . ($userInfo['USR_EMAIL'] != '' ? ' <' . $userInfo['USR_EMAIL'] . '>' : '');
|
||||
|
||||
if ($flagGmail === true) {
|
||||
$appDel = new AppDelegation();
|
||||
$actualThread = $appDel->Load($application, $index);
|
||||
|
||||
$appDelPrev = $appDel->LoadParallel($application);
|
||||
$Pmgmail = new Pmgmail();
|
||||
$pmGmail = new Pmgmail();
|
||||
foreach ($appDelPrev as $app) {
|
||||
if (($app['DEL_INDEX'] != $index) && ($app['DEL_PREVIOUS'] != $actualThread['DEL_PREVIOUS'])) {
|
||||
$Pmgmail->gmailsIfSelfServiceValueBased($application, $app['DEL_INDEX'], $postForm['TASKS'], $appFields['APP_DATA']);
|
||||
$pmGmail->gmailsIfSelfServiceValueBased($application, $app['DEL_INDEX'], $postForm['TASKS'], $appFields['APP_DATA']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
$this->sendNotifications($tasUid, $postForm['TASKS'], $appFields['APP_DATA'], $application, $index, $sFromData);
|
||||
$this->sendNotifications($tasUid, $postForm['TASKS'], $appFields['APP_DATA'], $application, $index, $fromData);
|
||||
} catch (Exception $e) {
|
||||
G::SendTemporalMessage(G::loadTranslation('ID_NOTIFICATION_ERROR') . ' - ' . $e->getMessage(), 'warning', 'string', null, '100%');
|
||||
}
|
||||
@@ -263,8 +263,8 @@ trait CasesTrait
|
||||
$case->updateCase($appUid, $fields);
|
||||
if (isset($files['form'])) {
|
||||
if (isset($files["form"]["name"]) && count($files["form"]["name"]) > 0) {
|
||||
$oInputDocument = new InputDocument();
|
||||
$oInputDocument->uploadFileCase($files, $case, $fields, $currentUsrUid, $appUid, $delIndex);
|
||||
$inputDocument = new InputDocument();
|
||||
$inputDocument->uploadFileCase($files, $case, $fields, $currentUsrUid, $appUid, $delIndex);
|
||||
}
|
||||
}
|
||||
$wsBase = new WsBase();
|
||||
|
||||
@@ -20,6 +20,7 @@ class SubApplication extends Model
|
||||
protected $primaryKey = 'APP_UID';
|
||||
// The IDs are auto-incrementing
|
||||
public $incrementing = false;
|
||||
|
||||
/**
|
||||
* The model's default values for attributes.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user