HOR-1328 Agregar los campos que se guardan en la tabla CONTENT relacionados a la tabla TASK
pmfunction change content by task remove lang in pmfunction add languaje by compatibility
This commit is contained in:
@@ -846,7 +846,7 @@ class wsBase
|
||||
public function taskList ($userId)
|
||||
{
|
||||
try {
|
||||
g::loadClass( 'groups' );
|
||||
G::LoadClass( 'groups' );
|
||||
$oGroup = new Groups();
|
||||
$aGroups = $oGroup->getActiveGroupsForAnUser( $userId );
|
||||
|
||||
@@ -855,19 +855,9 @@ class wsBase
|
||||
$del = DBAdapter::getStringDelimiter();
|
||||
$oCriteria->addSelectColumn( TaskPeer::PRO_UID );
|
||||
$oCriteria->addSelectColumn( TaskPeer::TAS_UID );
|
||||
$oCriteria->addSelectColumn( TaskPeer::TAS_TITLE );
|
||||
$oCriteria->addSelectColumn( TaskPeer::TAS_START );
|
||||
$oCriteria->setDistinct();
|
||||
$oCriteria->addAsColumn( 'TAS_TITLE', 'C1.CON_VALUE' );
|
||||
$oCriteria->addAlias( "C1", 'CONTENT' );
|
||||
$tasTitleConds = array ();
|
||||
$tasTitleConds[] = array (TaskPeer::TAS_UID,'C1.CON_ID'
|
||||
);
|
||||
$tasTitleConds[] = array ('C1.CON_CATEGORY',$del . 'TAS_TITLE' . $del
|
||||
);
|
||||
$tasTitleConds[] = array ('C1.CON_LANG',$del . SYS_LANG . $del
|
||||
);
|
||||
$oCriteria->addJoinMC( $tasTitleConds, Criteria::LEFT_JOIN );
|
||||
|
||||
$oCriteria->addJoin( TaskPeer::TAS_UID, TaskUserPeer::TAS_UID, Criteria::LEFT_JOIN );
|
||||
$oCriteria->addOr( TaskUserPeer::USR_UID, $userId );
|
||||
$oCriteria->addOr( TaskUserPeer::USR_UID, $aGroups, Criteria::IN );
|
||||
@@ -1960,7 +1950,7 @@ class wsBase
|
||||
$pro = $oProcesses->processExists( $processId );
|
||||
|
||||
if (! $pro) {
|
||||
$result = new wsResponse( 11, G::loadTranslation( 'ID_INVALID_PROCESS' ) . " " . $processId );
|
||||
$result = new wsResponse( 11, G::LoadTranslation( 'ID_INVALID_PROCESS' ) . " " . $processId );
|
||||
|
||||
$g->sessionVarRestore();
|
||||
|
||||
@@ -1992,7 +1982,7 @@ class wsBase
|
||||
}
|
||||
|
||||
if ($tasksInThisProcess > 1) {
|
||||
$result = new wsResponse( 13, G::loadTranslation( 'ID_MULTIPLE_STARTING_TASKS' ) );
|
||||
$result = new wsResponse( 13, G::LoadTranslation( 'ID_MULTIPLE_STARTING_TASKS' ) );
|
||||
|
||||
$g->sessionVarRestore();
|
||||
|
||||
@@ -2005,7 +1995,7 @@ class wsBase
|
||||
$arrayTaskTypeToExclude = array("START-TIMER-EVENT");
|
||||
|
||||
if (!is_null($task) && !in_array($task->getTasType(), $arrayTaskTypeToExclude) && $founded == "") {
|
||||
$result = new wsResponse( 14, G::loadTranslation( 'ID_TASK_INVALID_USER_NOT_ASSIGNED_TASK' ) );
|
||||
$result = new wsResponse( 14, G::LoadTranslation( 'ID_TASK_INVALID_USER_NOT_ASSIGNED_TASK' ) );
|
||||
|
||||
$g->sessionVarRestore();
|
||||
|
||||
@@ -2054,7 +2044,7 @@ class wsBase
|
||||
}
|
||||
|
||||
//Response
|
||||
$result = new wsResponse( 0, G::loadTranslation( 'ID_STARTED_SUCCESSFULLY' ) );
|
||||
$result = new wsResponse( 0, G::LoadTranslation( 'ID_STARTED_SUCCESSFULLY' ) );
|
||||
$result->caseId = $caseId;
|
||||
$result->caseNumber = $caseNr;
|
||||
|
||||
@@ -2201,7 +2191,7 @@ class wsBase
|
||||
$oCriteria->add( AppDelegationPeer::DEL_FINISH_DATE, null, Criteria::ISNULL );
|
||||
|
||||
if (AppDelegationPeer::doCount( $oCriteria ) > 1) {
|
||||
$result = new wsResponse( 20, G::loadTranslation( 'ID_SPECIFY_DELEGATION_INDEX' ) );
|
||||
$result = new wsResponse( 20, G::LoadTranslation( 'ID_SPECIFY_DELEGATION_INDEX' ) );
|
||||
return $result;
|
||||
}
|
||||
|
||||
@@ -2216,13 +2206,13 @@ class wsBase
|
||||
$appdel = $oAppDel->Load( $caseId, $delIndex );
|
||||
|
||||
if ($userId != $appdel['USR_UID']) {
|
||||
$result = new wsResponse( 17, G::loadTranslation( 'ID_CASE_ASSIGNED_ANOTHER_USER' ) );
|
||||
$result = new wsResponse( 17, G::LoadTranslation( 'ID_CASE_ASSIGNED_ANOTHER_USER' ) );
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
if ($appdel['DEL_FINISH_DATE'] != null) {
|
||||
$result = new wsResponse( 18, G::loadTranslation( 'ID_CASE_DELEGATION_ALREADY_CLOSED' ) );
|
||||
$result = new wsResponse( 18, G::LoadTranslation( 'ID_CASE_DELEGATION_ALREADY_CLOSED' ) );
|
||||
|
||||
return $result;
|
||||
}
|
||||
@@ -2240,7 +2230,7 @@ class wsBase
|
||||
|
||||
if (is_array( $aRow )) {
|
||||
if (isset( $aRow['APP_DISABLE_ACTION_USER'] ) && $aRow['APP_DISABLE_ACTION_USER'] != 0 && isset( $aRow['APP_DISABLE_ACTION_DATE'] ) && $aRow['APP_DISABLE_ACTION_DATE'] != '') {
|
||||
$result = new wsResponse( 19, G::loadTranslation( 'ID_CASE_IN_STATUS' ) . " " . $aRow['APP_TYPE'] );
|
||||
$result = new wsResponse( 19, G::LoadTranslation( 'ID_CASE_IN_STATUS' ) . " " . $aRow['APP_TYPE'] );
|
||||
|
||||
return $result;
|
||||
}
|
||||
@@ -2378,19 +2368,19 @@ class wsBase
|
||||
|
||||
if (isset($derive[1])) {
|
||||
if ($derive[1]['ROU_TYPE'] == 'SELECT') {
|
||||
$result = new wsResponse(21, G::loadTranslation('ID_CAN_NOT_ROUTE_CASE_USING_WEBSERVICES'));
|
||||
$result = new wsResponse(21, G::LoadTranslation('ID_CAN_NOT_ROUTE_CASE_USING_WEBSERVICES'));
|
||||
|
||||
return $result;
|
||||
}
|
||||
} else {
|
||||
$result = new wsResponse(22, G::loadTranslation('ID_TASK_DOES_NOT_HAVE_ROUTING_RULE'));
|
||||
$result = new wsResponse(22, G::LoadTranslation('ID_TASK_DOES_NOT_HAVE_ROUTING_RULE'));
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
foreach ($derive as $key => $val) {
|
||||
if ($val['NEXT_TASK']['TAS_ASSIGN_TYPE'] == 'MANUAL') {
|
||||
$result = new wsResponse(15, G::loadTranslation('ID_TASK_DEFINED_MANUAL_ASSIGNMENT'));
|
||||
$result = new wsResponse(15, G::LoadTranslation('ID_TASK_DEFINED_MANUAL_ASSIGNMENT'));
|
||||
|
||||
return $result;
|
||||
}
|
||||
@@ -2536,7 +2526,7 @@ class wsBase
|
||||
$appFields, $nextDelegations, $nextIndex, $delIndex);
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
\G::log(G::loadTranslation( 'ID_NOTIFICATION_ERROR' ) . '|' . $e->getMessage() , PATH_DATA, "mobile.log");
|
||||
\G::log(G::LoadTranslation( 'ID_NOTIFICATION_ERROR' ) . '|' . $e->getMessage() , PATH_DATA, "mobile.log");
|
||||
}
|
||||
// Send notifications Mobile - End
|
||||
|
||||
|
||||
Reference in New Issue
Block a user