Merge branch 'master' of bitbucket.org:colosa/processmaker

This commit is contained in:
Erik Amaru Ortiz
2013-12-09 09:58:54 -04:00
2 changed files with 18 additions and 10 deletions

View File

@@ -835,7 +835,11 @@ class Task
'aas_type' => "user" ); 'aas_type' => "user" );
$oDataset->next(); $oDataset->next();
} }
if (empty($aUsers)) {
throw (new \Exception( 'Record not found for id: '. $sAssigneeUID));
} else {
return $aUsers; return $aUsers;
}
} catch (Exception $e) { } catch (Exception $e) {
throw $e; throw $e;
} }
@@ -1169,7 +1173,11 @@ class Task
'aas_type' => "user" ); 'aas_type' => "user" );
$oDataset->next(); $oDataset->next();
} }
if (empty($aUsers)) {
throw (new \Exception( 'Record not found for id: '. $sAssigneeUID));
} else {
return $aUsers; return $aUsers;
}
} catch (Exception $e) { } catch (Exception $e) {
throw $e; throw $e;
} }

View File

@@ -89,16 +89,16 @@ class Assignee extends Api
* *
* @param string $prjUid * @param string $prjUid
* @param string $actUid * @param string $actUid
* @param string $assUid * @param string $ass_uid
* @param string $assType {@choice user,group} * @param string $ass_type {@choice user,group}
* *
* @status 201 * @status 201
*/ */
public function doPostActivityAssignee($prjUid, $actUid, $assUid, $assType) public function doPostActivityAssignee($prjUid, $actUid, $ass_uid, $ass_type)
{ {
try { try {
$task = new \BusinessModel\Task(); $task = new \BusinessModel\Task();
$arrayData = $task->addTaskAssignee($prjUid, $actUid, $assUid, $assType); $arrayData = $task->addTaskAssignee($prjUid, $actUid, $ass_uid, $ass_type);
//Response //Response
$response = $arrayData; $response = $arrayData;
} catch (\Exception $e) { } catch (\Exception $e) {
@@ -206,16 +206,16 @@ class Assignee extends Api
* *
* @param string $prjUid * @param string $prjUid
* @param string $actUid * @param string $actUid
* @param string $assUid * @param string $ass_uid
* @param string $assType {@choice user,group} * @param string $ass_type {@choice user,group}
* *
* @status 201 * @status 201
*/ */
public function doPostActivityAdhocAssignee($prjUid, $actUid, $assUid, $assType) public function doPostActivityAdhocAssignee($prjUid, $actUid, $ass_uid, $ass_type)
{ {
try { try {
$task = new \BusinessModel\Task(); $task = new \BusinessModel\Task();
$arrayData = $task->addTaskAdhocAssignee($prjUid, $actUid, $assUid, $assType); $arrayData = $task->addTaskAdhocAssignee($prjUid, $actUid, $ass_uid, $ass_type);
//Response //Response
$response = $arrayData; $response = $arrayData;
} catch (\Exception $e) { } catch (\Exception $e) {