Se agregan validaciones de project y activity para ASSIGNEE y ASSIGNEE ADHOC
This commit is contained in:
@@ -94,7 +94,7 @@ class ProjectUser
|
||||
$tasksLastIndex = count( $taskValue ) - 1;
|
||||
$taskValue = explode( ')', $taskValue[$tasksLastIndex] );
|
||||
//echo "<option value=\"" . $task['uid'] . "\">" . $taskValue[0] . "</option>";
|
||||
echo $task['uid'] ." ------ ".$aUsers["tas_uid"]." fin ";
|
||||
echo $task['uid'] ." ------ ".$aUsers." fin ";
|
||||
//var_dump($aUsers);
|
||||
if (in_array($task['uid'], $aUsers)) {
|
||||
echo "Es mac";
|
||||
|
||||
@@ -589,6 +589,14 @@ class Task
|
||||
public function getTaskAssignees($sProcessUID, $sTaskUID, $filter, $start, $limit)
|
||||
{
|
||||
try {
|
||||
$oProcess = \ProcessPeer::retrieveByPK( $sProcessUID );
|
||||
if (is_null($oProcess)) {
|
||||
throw (new \Exception( 'This id for `prj_uid`: '. $sProcessUID .' do not correspond to a registered process'));
|
||||
}
|
||||
$oActivity = \TaskPeer::retrieveByPK( $sTaskUID );
|
||||
if (is_null($oActivity)) {
|
||||
throw (new \Exception( 'This id for `act_uid`: '. $sTaskUID .' do not correspond to a registered activity'));
|
||||
}
|
||||
$aUsers = array();
|
||||
$sDelimiter = \DBAdapter::getStringDelimiter();
|
||||
$oCriteria = new \Criteria('workflow');
|
||||
@@ -693,6 +701,14 @@ class Task
|
||||
public function getTaskAvailableAssignee($sProcessUID, $sTaskUID, $filter, $start, $limit)
|
||||
{
|
||||
try {
|
||||
$oProcess = \ProcessPeer::retrieveByPK( $sProcessUID );
|
||||
if (is_null($oProcess)) {
|
||||
throw (new \Exception( 'This id for `prj_uid`: '. $sProcessUID .' do not correspond to a registered process'));
|
||||
}
|
||||
$oActivity = \TaskPeer::retrieveByPK( $sTaskUID );
|
||||
if (is_null($oActivity)) {
|
||||
throw (new \Exception( 'This id for `act_uid`: '. $sTaskUID .' do not correspond to a registered activity'));
|
||||
}
|
||||
$iType = 1;
|
||||
$aUsers = array();
|
||||
$oTasks = new \Tasks();
|
||||
@@ -788,6 +804,14 @@ class Task
|
||||
public function getTaskAssignee($sProcessUID, $sTaskUID, $sAssigneeUID)
|
||||
{
|
||||
try {
|
||||
$oProcess = \ProcessPeer::retrieveByPK( $sProcessUID );
|
||||
if (is_null($oProcess)) {
|
||||
throw (new \Exception( 'This id for `prj_uid`: '. $sProcessUID .' do not correspond to a registered process'));
|
||||
}
|
||||
$oActivity = \TaskPeer::retrieveByPK( $sTaskUID );
|
||||
if (is_null($oActivity)) {
|
||||
throw (new \Exception( 'This id for `act_uid`: '. $sTaskUID .' do not correspond to a registered activity'));
|
||||
}
|
||||
$iType = 1;
|
||||
$aUsers = array();
|
||||
$sDelimiter = \DBAdapter::getStringDelimiter();
|
||||
@@ -889,6 +913,14 @@ class Task
|
||||
public function addTaskAssignee($sProcessUID, $sTaskUID, $sAssigneeUID, $assType)
|
||||
{
|
||||
try {
|
||||
$oProcess = \ProcessPeer::retrieveByPK( $sProcessUID );
|
||||
if (is_null($oProcess)) {
|
||||
throw (new \Exception( 'This id for `prj_uid`: '. $sProcessUID .' do not correspond to a registered process'));
|
||||
}
|
||||
$oActivity = \TaskPeer::retrieveByPK( $sTaskUID );
|
||||
if (is_null($oActivity)) {
|
||||
throw (new \Exception( 'This id for `act_uid`: '. $sTaskUID .' do not correspond to a registered activity'));
|
||||
}
|
||||
$iType = 1;
|
||||
$oCriteria = new \Criteria('workflow');
|
||||
$oCriteria->addSelectColumn( \TaskUserPeer::TU_RELATION );
|
||||
@@ -952,6 +984,14 @@ class Task
|
||||
public function removeTaskAssignee($sProcessUID, $sTaskUID, $sAssigneeUID)
|
||||
{
|
||||
try {
|
||||
$oProcess = \ProcessPeer::retrieveByPK( $sProcessUID );
|
||||
if (is_null($oProcess)) {
|
||||
throw (new \Exception( 'This id for `prj_uid`: '. $sProcessUID .' do not correspond to a registered process'));
|
||||
}
|
||||
$oActivity = \TaskPeer::retrieveByPK( $sTaskUID );
|
||||
if (is_null($oActivity)) {
|
||||
throw (new \Exception( 'This id for `act_uid`: '. $sTaskUID .' do not correspond to a registered activity'));
|
||||
}
|
||||
$iType = 1;
|
||||
$oCriteria = new \Criteria('workflow');
|
||||
$oCriteria->addSelectColumn( \TaskUserPeer::TU_RELATION );
|
||||
@@ -988,6 +1028,14 @@ class Task
|
||||
public function getTaskAdhocAssignees($sProcessUID, $sTaskUID, $filter, $start, $limit)
|
||||
{
|
||||
try {
|
||||
$oProcess = \ProcessPeer::retrieveByPK( $sProcessUID );
|
||||
if (is_null($oProcess)) {
|
||||
throw (new \Exception( 'This id for `prj_uid`: '. $sProcessUID .' do not correspond to a registered process'));
|
||||
}
|
||||
$oActivity = \TaskPeer::retrieveByPK( $sTaskUID );
|
||||
if (is_null($oActivity)) {
|
||||
throw (new \Exception( 'This id for `act_uid`: '. $sTaskUID .' do not correspond to a registered activity'));
|
||||
}
|
||||
$aUsers = array();
|
||||
$sDelimiter = \DBAdapter::getStringDelimiter();
|
||||
$oCriteria = new \Criteria('workflow');
|
||||
@@ -1089,6 +1137,14 @@ class Task
|
||||
public function getTaskAvailableAdhocAssignee($sProcessUID, $sTaskUID, $filter, $start, $limit)
|
||||
{
|
||||
try {
|
||||
$oProcess = \ProcessPeer::retrieveByPK( $sProcessUID );
|
||||
if (is_null($oProcess)) {
|
||||
throw (new \Exception( 'This id for `prj_uid`: '. $sProcessUID .' do not correspond to a registered process'));
|
||||
}
|
||||
$oActivity = \TaskPeer::retrieveByPK( $sTaskUID );
|
||||
if (is_null($oActivity)) {
|
||||
throw (new \Exception( 'This id for `act_uid`: '. $sTaskUID .' do not correspond to a registered activity'));
|
||||
}
|
||||
$iType = 2;
|
||||
$aUsers = array();
|
||||
$oTasks = new \Tasks();
|
||||
@@ -1184,6 +1240,14 @@ class Task
|
||||
public function getTaskAdhocAssignee($sProcessUID, $sTaskUID, $sAssigneeUID)
|
||||
{
|
||||
try {
|
||||
$oProcess = \ProcessPeer::retrieveByPK( $sProcessUID );
|
||||
if (is_null($oProcess)) {
|
||||
throw (new \Exception( 'This id for `prj_uid`: '. $sProcessUID .' do not correspond to a registered process'));
|
||||
}
|
||||
$oActivity = \TaskPeer::retrieveByPK( $sTaskUID );
|
||||
if (is_null($oActivity)) {
|
||||
throw (new \Exception( 'This id for `act_uid`: '. $sTaskUID .' do not correspond to a registered activity'));
|
||||
}
|
||||
$iType = 2;
|
||||
$aUsers = array();
|
||||
$sDelimiter = \DBAdapter::getStringDelimiter();
|
||||
@@ -1285,6 +1349,14 @@ class Task
|
||||
public function addTaskAdhocAssignee($sProcessUID, $sTaskUID, $sAssigneeUID, $assType)
|
||||
{
|
||||
try {
|
||||
$oProcess = \ProcessPeer::retrieveByPK( $sProcessUID );
|
||||
if (is_null($oProcess)) {
|
||||
throw (new \Exception( 'This id for `prj_uid`: '. $sProcessUID .' do not correspond to a registered process'));
|
||||
}
|
||||
$oActivity = \TaskPeer::retrieveByPK( $sTaskUID );
|
||||
if (is_null($oActivity)) {
|
||||
throw (new \Exception( 'This id for `act_uid`: '. $sTaskUID .' do not correspond to a registered activity'));
|
||||
}
|
||||
$iType = 2;
|
||||
$oCriteria = new \Criteria('workflow');
|
||||
$oCriteria->addSelectColumn( \TaskUserPeer::TU_RELATION );
|
||||
@@ -1348,6 +1420,14 @@ class Task
|
||||
public function removeTaskAdhocAssignee($sProcessUID, $sTaskUID, $sAssigneeUID)
|
||||
{
|
||||
try {
|
||||
$oProcess = \ProcessPeer::retrieveByPK( $sProcessUID );
|
||||
if (is_null($oProcess)) {
|
||||
throw (new \Exception( 'This id for `prj_uid`: '. $sProcessUID .' do not correspond to a registered process'));
|
||||
}
|
||||
$oActivity = \TaskPeer::retrieveByPK( $sTaskUID );
|
||||
if (is_null($oActivity)) {
|
||||
throw (new \Exception( 'This id for `act_uid`: '. $sTaskUID .' do not correspond to a registered activity'));
|
||||
}
|
||||
$iType = 2;
|
||||
$oCriteria = new \Criteria('workflow');
|
||||
$oCriteria->addSelectColumn( \TaskUserPeer::TU_RELATION );
|
||||
|
||||
@@ -14,8 +14,8 @@ class Assignee extends Api
|
||||
/**
|
||||
* @url GET /:prjUid/activity/:actUid/assignee
|
||||
*
|
||||
* @param string $prjUid
|
||||
* @param string $actUid
|
||||
* @param string $prjUid {@min 32} {@max 32}
|
||||
* @param string $actUid {@min 32} {@max 32}
|
||||
* @param string $filter
|
||||
* @param int $start
|
||||
* @param int $limit
|
||||
@@ -39,8 +39,8 @@ class Assignee extends Api
|
||||
/**
|
||||
* @url GET /:prjUid/activity/:actUid/available-assignee
|
||||
*
|
||||
* @param string $prjUid
|
||||
* @param string $actUid
|
||||
* @param string $prjUid {@min 32} {@max 32}
|
||||
* @param string $actUid {@min 32} {@max 32}
|
||||
* @param string $filter
|
||||
* @param int $start
|
||||
* @param int $limit
|
||||
@@ -64,9 +64,9 @@ class Assignee extends Api
|
||||
/**
|
||||
* @url GET /:prjUid/activity/:actUid/assignee/:aasUid
|
||||
*
|
||||
* @param string $prjUid
|
||||
* @param string $actUid
|
||||
* @param string $aasUid
|
||||
* @param string $prjUid {@min 32} {@max 32}
|
||||
* @param string $actUid {@min 32} {@max 32}
|
||||
* @param string $aasUid {@min 32} {@max 32}
|
||||
*
|
||||
*/
|
||||
public function doGetActivityAssignee($prjUid, $actUid, $aasUid)
|
||||
@@ -87,9 +87,9 @@ class Assignee extends Api
|
||||
/**
|
||||
* @url POST /:prjUid/activity/:actUid/assignee
|
||||
*
|
||||
* @param string $prjUid
|
||||
* @param string $actUid
|
||||
* @param string $aas_uid
|
||||
* @param string $prjUid {@min 32} {@max 32}
|
||||
* @param string $actUid {@min 32} {@max 32}
|
||||
* @param string $aas_uid {@min 32} {@max 32}
|
||||
* @param string $aas_type {@choice user,group}
|
||||
*
|
||||
* @status 201
|
||||
@@ -109,9 +109,9 @@ class Assignee extends Api
|
||||
/**
|
||||
* @url DELETE /:prjUid/activity/:actUid/assignee/:aasUid
|
||||
*
|
||||
* @param string $prjUid
|
||||
* @param string $actUid
|
||||
* @param string $aasUid
|
||||
* @param string $prjUid {@min 32} {@max 32}
|
||||
* @param string $actUid {@min 32} {@max 32}
|
||||
* @param string $aasUid {@min 32} {@max 32}
|
||||
*
|
||||
*/
|
||||
public function doDeleteActivityAssignee($prjUid, $actUid, $aasUid)
|
||||
@@ -129,8 +129,8 @@ class Assignee extends Api
|
||||
/**
|
||||
* @url GET /:prjUid/activity/:actUid/adhoc-assignee
|
||||
*
|
||||
* @param string $prjUid
|
||||
* @param string $actUid
|
||||
* @param string $prjUid {@min 32} {@max 32}
|
||||
* @param string $actUid {@min 32} {@max 32}
|
||||
* @param string $filter
|
||||
* @param int $start
|
||||
* @param int $limit
|
||||
@@ -154,8 +154,8 @@ class Assignee extends Api
|
||||
/**
|
||||
* @url GET /:prjUid/activity/:actUid/adhoc-available-assignee
|
||||
*
|
||||
* @param string $prjUid
|
||||
* @param string $actUid
|
||||
* @param string $prjUid {@min 32} {@max 32}
|
||||
* @param string $actUid {@min 32} {@max 32}
|
||||
* @param string $filter
|
||||
* @param int $start
|
||||
* @param int $limit
|
||||
@@ -179,9 +179,9 @@ class Assignee extends Api
|
||||
/**
|
||||
* @url GET /:prjUid/activity/:actUid/adhoc-assignee/:aasUid
|
||||
*
|
||||
* @param string $prjUid
|
||||
* @param string $actUid
|
||||
* @param string $assUid
|
||||
* @param string $prjUid {@min 32} {@max 32}
|
||||
* @param string $actUid {@min 32} {@max 32}
|
||||
* @param string $assUid {@min 32} {@max 32}
|
||||
*
|
||||
*/
|
||||
public function doGetActivityAdhocAssignee($prjUid, $actUid, $aasUid)
|
||||
@@ -202,9 +202,9 @@ class Assignee extends Api
|
||||
/**
|
||||
* @url POST /:prjUid/activity/:actUid/adhoc-assignee
|
||||
*
|
||||
* @param string $prjUid
|
||||
* @param string $actUid
|
||||
* @param string $ada_uid
|
||||
* @param string $prjUid {@min 32} {@max 32}
|
||||
* @param string $actUid {@min 32} {@max 32}
|
||||
* @param string $ada_uid {@min 32} {@max 32}
|
||||
* @param string $ada_type {@choice user,group}
|
||||
*
|
||||
* @status 201
|
||||
@@ -224,9 +224,9 @@ class Assignee extends Api
|
||||
/**
|
||||
* @url DELETE /:prjUid/activity/:actUid/adhoc-assignee/:adaUid
|
||||
*
|
||||
* @param string $prjUid
|
||||
* @param string $actUid
|
||||
* @param string $adaUid
|
||||
* @param string $prjUid {@min 32} {@max 32}
|
||||
* @param string $actUid {@min 32} {@max 32}
|
||||
* @param string $adaUid {@min 32} {@max 32}
|
||||
*
|
||||
*/
|
||||
public function doDeleteActivityAdhocAssignee($prjUid, $actUid, $adaUid)
|
||||
|
||||
Reference in New Issue
Block a user