Merge branch 'master' of bitbucket.org:colosa/processmaker
This commit is contained in:
@@ -1597,8 +1597,8 @@ class Processes
|
||||
try {
|
||||
$aOutput = array ();
|
||||
$oCriteria = new Criteria( 'workflow' );
|
||||
$oCriteria->add( OutputdocumentPeer::PRO_UID, $sProUid );
|
||||
$oDataset = OutputdocumentPeer::doSelectRS( $oCriteria );
|
||||
$oCriteria->add( OutputDocumentPeer::PRO_UID, $sProUid );
|
||||
$oDataset = OutputDocumentPeer::doSelectRS( $oCriteria );
|
||||
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||
$oDataset->next();
|
||||
while ($aRow = $oDataset->getRow()) {
|
||||
|
||||
@@ -54,5 +54,11 @@ class ProcessCategory extends BaseProcessCategory
|
||||
$aRow = $dataset->getRow();
|
||||
return $aRow;
|
||||
}
|
||||
|
||||
public function exists ($catUid)
|
||||
{
|
||||
$oProCat = ProcessCategoryPeer::retrieveByPk( $catUid );
|
||||
return (is_object( $oProCat ) && get_class( $oProCat ) == 'ProcessCategory');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ class Cases
|
||||
$dir = isset( $dataList["dir"] ) ? $dataList["dir"] : "DESC";
|
||||
$sort = isset( $dataList["sort"] ) ? $dataList["sort"] : "APP_CACHE_VIEW.APP_NUMBER";
|
||||
$start = isset( $dataList["start"] ) ? $dataList["start"] : "0";
|
||||
$limit = isset( $dataList["limit"] ) ? $dataList["limit"] : "25";
|
||||
$limit = isset( $dataList["limit"] ) ? $dataList["limit"] : "config";
|
||||
$filter = isset( $dataList["filter"] ) ? $dataList["filter"] : "";
|
||||
$process = isset( $dataList["process"] ) ? $dataList["process"] : "";
|
||||
$category = isset( $dataList["category"] ) ? $dataList["category"] : "";
|
||||
@@ -47,8 +47,8 @@ class Cases
|
||||
$action = isset( $dataList["action"] ) ? $dataList["action"] : "todo";
|
||||
$paged = isset( $dataList["paged"] ) ? $dataList["paged"] : true;
|
||||
$type = "extjs";
|
||||
$dateFrom = isset( $dataList["dateFrom"] ) ? substr( $dataList["dateFrom"], 0, 10 ) : "";
|
||||
$dateTo = isset( $dataList["dateTo"] ) ? substr( $dataList["dateTo"], 0, 10 ) : "";
|
||||
$dateFrom = (!empty( $dataList["dateFrom"] )) ? substr( $dataList["dateFrom"], 0, 10 ) : "";
|
||||
$dateTo = (!empty( $dataList["dateTo"] )) ? substr( $dataList["dateTo"], 0, 10 ) : "";
|
||||
$first = isset( $dataList["first"] ) ? true :false;
|
||||
|
||||
$valuesCorrect = array('todo', 'draft', 'paused', 'sent', 'selfservice', 'unassigned', 'search');
|
||||
@@ -56,6 +56,55 @@ class Cases
|
||||
throw (new \Exception('The value for $action is incorrect.'));
|
||||
}
|
||||
|
||||
$start = (int)$start;
|
||||
$start = abs($start);
|
||||
if ($start != 0) {
|
||||
$start--;
|
||||
}
|
||||
if ($limit == 'config') {
|
||||
G::LoadClass("configuration");
|
||||
$conf = new \Configurations();
|
||||
$generalConfCasesList = $conf->getConfiguration('ENVIRONMENT_SETTINGS', '');
|
||||
if (isset($generalConfCasesList['casesListRowNumber'])) {
|
||||
$limit = (int)$generalConfCasesList['casesListRowNumber'];
|
||||
} else {
|
||||
$limit = 25;
|
||||
}
|
||||
} else {
|
||||
$limit = (int)$limit;
|
||||
}
|
||||
if ($sort != 'APP_CACHE_VIEW.APP_NUMBER') {
|
||||
$sort = G::toUpper($sort);
|
||||
$columnsAppCacheView = \AppCacheViewPeer::getFieldNames(\BasePeer::TYPE_FIELDNAME);
|
||||
if (!(in_array($sort, $columnsAppCacheView))) {
|
||||
$sort = 'APP_CACHE_VIEW.APP_NUMBER';
|
||||
}
|
||||
}
|
||||
$dir = G::toUpper($dir);
|
||||
if (!($dir == 'DESC' || $dir == 'ASC')) {
|
||||
$dir = 'DESC';
|
||||
}
|
||||
if ($process != '') {
|
||||
Validator::proUid($process, '$pro_uid');
|
||||
}
|
||||
if ($category != '') {
|
||||
Validator::catUid($category, '$cat_uid');
|
||||
}
|
||||
$status = G::toUpper($status);
|
||||
$listStatus = array('TODO', 'DRAFT', 'COMPLETED', 'CANCEL', 'OPEN', 'CLOSE');
|
||||
if (!(in_array($status, $listStatus))) {
|
||||
$status = '';
|
||||
}
|
||||
if ($user != '') {
|
||||
Validator::usrUid($user, '$usr_uid');
|
||||
}
|
||||
if ($dateFrom != '') {
|
||||
Validator::isDate($dateFrom, 'Y-m-d', '$date_from');
|
||||
}
|
||||
if ($dateTo != '') {
|
||||
Validator::isDate($dateTo, 'Y-m-d', '$date_to');
|
||||
}
|
||||
|
||||
if ($action == 'search' || $action == 'to_reassign') {
|
||||
$userUid = ($user == "CURRENT_USER") ? $userUid : $user;
|
||||
if ($first) {
|
||||
@@ -139,13 +188,19 @@ class Cases
|
||||
} else {
|
||||
$result['total'] = $result['totalCount'];
|
||||
unset($result['totalCount']);
|
||||
|
||||
$result['start'] = $start;
|
||||
$result['start'] = $start+1;
|
||||
$result['limit'] = $limit;
|
||||
$result['sort'] = $sort;
|
||||
$result['category'] = $category;
|
||||
$result['process'] = $process;
|
||||
$result['sort'] = G::toLower($sort);
|
||||
$result['dir'] = G::toLower($dir);
|
||||
$result['cat_uid'] = $category;
|
||||
$result['pro_uid'] = $process;
|
||||
$result['search'] = $search;
|
||||
if ($action == 'search') {
|
||||
$result['app_status'] = G::toLower($status);
|
||||
$result['usr_uid'] = $user;
|
||||
$result['date_from'] = $dateFrom;
|
||||
$result['date_to'] = $dateTo;
|
||||
}
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
@@ -511,6 +566,8 @@ class Cases
|
||||
$ws = new \wsBase();
|
||||
if ($variables) {
|
||||
$variables = array_shift($variables);
|
||||
} elseif ($variables == null) {
|
||||
$variables = array(array());
|
||||
}
|
||||
$fields = $ws->newCaseImpersonate($processUid, $userUid, $variables, $taskUid);
|
||||
$array = json_decode(json_encode($fields), true);
|
||||
|
||||
@@ -171,6 +171,56 @@ class Validator{
|
||||
return $tri_uid;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate pro_uid
|
||||
*
|
||||
* @param string $pro_uid, Uid for process
|
||||
* @param string $nameField . Name of field for message
|
||||
*
|
||||
* @access public
|
||||
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
|
||||
* @copyright Colosa - Bolivia
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
static public function proUid($pro_uid, $nameField = 'pro_uid')
|
||||
{
|
||||
$pro_uid = trim($pro_uid);
|
||||
if ($pro_uid == '') {
|
||||
throw (new \Exception("The process with $nameField: '' does not exist."));
|
||||
}
|
||||
$oProcess = new \Process();
|
||||
if (!($oProcess->exists($pro_uid))) {
|
||||
throw (new \Exception("The process with $nameField: '$pro_uid' does not exist."));
|
||||
}
|
||||
return $pro_uid;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate cat_uid
|
||||
*
|
||||
* @param string $cat_uid, Uid for category
|
||||
* @param string $nameField . Name of field for message
|
||||
*
|
||||
* @access public
|
||||
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
|
||||
* @copyright Colosa - Bolivia
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
static public function catUid($cat_uid, $nameField = 'cat_uid')
|
||||
{
|
||||
$cat_uid = trim($cat_uid);
|
||||
if ($cat_uid == '') {
|
||||
throw (new \Exception("The category with $nameField: '' does not exist."));
|
||||
}
|
||||
$oCategory = new \ProcessCategory();
|
||||
if (!($oCategory->exists($cat_uid))) {
|
||||
throw (new \Exception("The category with $nameField: '$cat_uid' does not exist."));
|
||||
}
|
||||
return $cat_uid;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate date
|
||||
*
|
||||
|
||||
@@ -22,8 +22,8 @@ class Cases extends Api
|
||||
* @param string $start {@from path}
|
||||
* @param string $limit {@from path}
|
||||
* @param string $dir {@from path}
|
||||
* @param string $category {@from path}
|
||||
* @param string $process {@from path}
|
||||
* @param string $cat_uid {@from path}
|
||||
* @param string $pro_uid {@from path}
|
||||
* @param string $search {@from path}
|
||||
* @return array
|
||||
*
|
||||
@@ -37,8 +37,8 @@ class Cases extends Api
|
||||
$limit = 25,
|
||||
$sort = 'APP_CACHE_VIEW.APP_NUMBER',
|
||||
$dir = 'DESC',
|
||||
$category = '',
|
||||
$process = '',
|
||||
$cat_uid = '',
|
||||
$pro_uid = '',
|
||||
$search = ''
|
||||
)
|
||||
{
|
||||
@@ -51,8 +51,8 @@ class Cases extends Api
|
||||
$dataList['limit'] = $limit;
|
||||
$dataList['sort'] = $sort;
|
||||
$dataList['dir'] = $dir;
|
||||
$dataList['category'] = $category;
|
||||
$dataList['process'] = $process;
|
||||
$dataList['category'] = $cat_uid;
|
||||
$dataList['process'] = $pro_uid;
|
||||
$dataList['search'] = $search;
|
||||
$oCases = new \BusinessModel\Cases();
|
||||
$response = $oCases->getList($dataList);
|
||||
@@ -69,8 +69,8 @@ class Cases extends Api
|
||||
* @param string $start {@from path}
|
||||
* @param string $limit {@from path}
|
||||
* @param string $dir {@from path}
|
||||
* @param string $category {@from path}
|
||||
* @param string $process {@from path}
|
||||
* @param string $cat_uid {@from path}
|
||||
* @param string $pro_uid {@from path}
|
||||
* @param string $search {@from path}
|
||||
* @return array
|
||||
*
|
||||
@@ -84,8 +84,8 @@ class Cases extends Api
|
||||
$limit = 25,
|
||||
$sort = 'APP_CACHE_VIEW.APP_NUMBER',
|
||||
$dir = 'DESC',
|
||||
$category = '',
|
||||
$process = '',
|
||||
$cat_uid = '',
|
||||
$pro_uid = '',
|
||||
$search = ''
|
||||
)
|
||||
{
|
||||
@@ -98,8 +98,8 @@ class Cases extends Api
|
||||
$dataList['limit'] = $limit;
|
||||
$dataList['sort'] = $sort;
|
||||
$dataList['dir'] = $dir;
|
||||
$dataList['category'] = $category;
|
||||
$dataList['process'] = $process;
|
||||
$dataList['category'] = $cat_uid;
|
||||
$dataList['process'] = $pro_uid;
|
||||
$dataList['search'] = $search;
|
||||
$oCases = new \BusinessModel\Cases();
|
||||
$response = $oCases->getList($dataList);
|
||||
@@ -116,8 +116,8 @@ class Cases extends Api
|
||||
* @param string $start {@from path}
|
||||
* @param string $limit {@from path}
|
||||
* @param string $dir {@from path}
|
||||
* @param string $category {@from path}
|
||||
* @param string $process {@from path}
|
||||
* @param string $cat_uid {@from path}
|
||||
* @param string $pro_uid {@from path}
|
||||
* @param string $search {@from path}
|
||||
* @return array
|
||||
*
|
||||
@@ -131,8 +131,8 @@ class Cases extends Api
|
||||
$limit = 25,
|
||||
$sort = 'APP_CACHE_VIEW.APP_NUMBER',
|
||||
$dir = 'DESC',
|
||||
$category = '',
|
||||
$process = '',
|
||||
$cat_uid = '',
|
||||
$pro_uid = '',
|
||||
$search = ''
|
||||
)
|
||||
{
|
||||
@@ -145,8 +145,8 @@ class Cases extends Api
|
||||
$dataList['limit'] = $limit;
|
||||
$dataList['sort'] = $sort;
|
||||
$dataList['dir'] = $dir;
|
||||
$dataList['category'] = $category;
|
||||
$dataList['process'] = $process;
|
||||
$dataList['category'] = $cat_uid;
|
||||
$dataList['process'] = $pro_uid;
|
||||
$dataList['search'] = $search;
|
||||
$oCases = new \BusinessModel\Cases();
|
||||
$response = $oCases->getList($dataList);
|
||||
@@ -163,8 +163,8 @@ class Cases extends Api
|
||||
* @param string $start {@from path}
|
||||
* @param string $limit {@from path}
|
||||
* @param string $dir {@from path}
|
||||
* @param string $category {@from path}
|
||||
* @param string $process {@from path}
|
||||
* @param string $cat_uid {@from path}
|
||||
* @param string $pro_uid {@from path}
|
||||
* @param string $search {@from path}
|
||||
* @return array
|
||||
*
|
||||
@@ -178,8 +178,8 @@ class Cases extends Api
|
||||
$limit = 25,
|
||||
$sort = 'APP_CACHE_VIEW.APP_NUMBER',
|
||||
$dir = 'DESC',
|
||||
$category = '',
|
||||
$process = '',
|
||||
$cat_uid = '',
|
||||
$pro_uid = '',
|
||||
$search = ''
|
||||
)
|
||||
{
|
||||
@@ -192,8 +192,8 @@ class Cases extends Api
|
||||
$dataList['limit'] = $limit;
|
||||
$dataList['sort'] = $sort;
|
||||
$dataList['dir'] = $dir;
|
||||
$dataList['category'] = $category;
|
||||
$dataList['process'] = $process;
|
||||
$dataList['category'] = $cat_uid;
|
||||
$dataList['process'] = $pro_uid;
|
||||
$dataList['search'] = $search;
|
||||
$oCases = new \BusinessModel\Cases();
|
||||
$response = $oCases->getList($dataList);
|
||||
@@ -210,8 +210,8 @@ class Cases extends Api
|
||||
* @param string $start {@from path}
|
||||
* @param string $limit {@from path}
|
||||
* @param string $dir {@from path}
|
||||
* @param string $category {@from path}
|
||||
* @param string $process {@from path}
|
||||
* @param string $cat_uid {@from path}
|
||||
* @param string $pro_uid {@from path}
|
||||
* @param string $search {@from path}
|
||||
* @return array
|
||||
*
|
||||
@@ -225,8 +225,8 @@ class Cases extends Api
|
||||
$limit = 25,
|
||||
$sort = 'APP_CACHE_VIEW.APP_NUMBER',
|
||||
$dir = 'DESC',
|
||||
$category = '',
|
||||
$process = '',
|
||||
$cat_uid = '',
|
||||
$pro_uid = '',
|
||||
$search = ''
|
||||
)
|
||||
{
|
||||
@@ -239,8 +239,8 @@ class Cases extends Api
|
||||
$dataList['limit'] = $limit;
|
||||
$dataList['sort'] = $sort;
|
||||
$dataList['dir'] = $dir;
|
||||
$dataList['category'] = $category;
|
||||
$dataList['process'] = $process;
|
||||
$dataList['category'] = $cat_uid;
|
||||
$dataList['process'] = $pro_uid;
|
||||
$dataList['search'] = $search;
|
||||
$oCases = new \BusinessModel\Cases();
|
||||
$response = $oCases->getList($dataList);
|
||||
@@ -257,8 +257,8 @@ class Cases extends Api
|
||||
* @param string $start {@from path}
|
||||
* @param string $limit {@from path}
|
||||
* @param string $dir {@from path}
|
||||
* @param string $category {@from path}
|
||||
* @param string $process {@from path}
|
||||
* @param string $cat_uid {@from path}
|
||||
* @param string $pro_uid {@from path}
|
||||
* @param string $search {@from path}
|
||||
* @return array
|
||||
*
|
||||
@@ -272,8 +272,8 @@ class Cases extends Api
|
||||
$limit = 25,
|
||||
$sort = 'APP_CACHE_VIEW.APP_NUMBER',
|
||||
$dir = 'DESC',
|
||||
$category = '',
|
||||
$process = '',
|
||||
$cat_uid = '',
|
||||
$pro_uid = '',
|
||||
$search = ''
|
||||
)
|
||||
{
|
||||
@@ -286,8 +286,8 @@ class Cases extends Api
|
||||
$dataList['limit'] = $limit;
|
||||
$dataList['sort'] = $sort;
|
||||
$dataList['dir'] = $dir;
|
||||
$dataList['category'] = $category;
|
||||
$dataList['process'] = $process;
|
||||
$dataList['category'] = $cat_uid;
|
||||
$dataList['process'] = $pro_uid;
|
||||
$dataList['search'] = $search;
|
||||
$oCases = new \BusinessModel\Cases();
|
||||
$response = $oCases->getList($dataList);
|
||||
@@ -304,8 +304,8 @@ class Cases extends Api
|
||||
* @param string $start {@from path}
|
||||
* @param string $limit {@from path}
|
||||
* @param string $dir {@from path}
|
||||
* @param string $category {@from path}
|
||||
* @param string $process {@from path}
|
||||
* @param string $cat_uid {@from path}
|
||||
* @param string $pro_uid {@from path}
|
||||
* @param string $search {@from path}
|
||||
* @return array
|
||||
*
|
||||
@@ -319,8 +319,8 @@ class Cases extends Api
|
||||
$limit = 25,
|
||||
$sort = 'APP_CACHE_VIEW.APP_NUMBER',
|
||||
$dir = 'DESC',
|
||||
$category = '',
|
||||
$process = '',
|
||||
$cat_uid = '',
|
||||
$pro_uid = '',
|
||||
$search = ''
|
||||
)
|
||||
{
|
||||
@@ -333,8 +333,8 @@ class Cases extends Api
|
||||
$dataList['limit'] = $limit;
|
||||
$dataList['sort'] = $sort;
|
||||
$dataList['dir'] = $dir;
|
||||
$dataList['category'] = $category;
|
||||
$dataList['process'] = $process;
|
||||
$dataList['category'] = $cat_uid;
|
||||
$dataList['process'] = $pro_uid;
|
||||
$dataList['search'] = $search;
|
||||
$oCases = new \BusinessModel\Cases();
|
||||
$response = $oCases->getList($dataList);
|
||||
@@ -351,8 +351,8 @@ class Cases extends Api
|
||||
* @param string $start {@from path}
|
||||
* @param string $limit {@from path}
|
||||
* @param string $dir {@from path}
|
||||
* @param string $category {@from path}
|
||||
* @param string $process {@from path}
|
||||
* @param string $cat_uid {@from path}
|
||||
* @param string $pro_uid {@from path}
|
||||
* @param string $search {@from path}
|
||||
* @return array
|
||||
*
|
||||
@@ -366,8 +366,8 @@ class Cases extends Api
|
||||
$limit = 25,
|
||||
$sort = 'APP_CACHE_VIEW.APP_NUMBER',
|
||||
$dir = 'DESC',
|
||||
$category = '',
|
||||
$process = '',
|
||||
$cat_uid = '',
|
||||
$pro_uid = '',
|
||||
$search = ''
|
||||
)
|
||||
{
|
||||
@@ -380,8 +380,8 @@ class Cases extends Api
|
||||
$dataList['limit'] = $limit;
|
||||
$dataList['sort'] = $sort;
|
||||
$dataList['dir'] = $dir;
|
||||
$dataList['category'] = $category;
|
||||
$dataList['process'] = $process;
|
||||
$dataList['category'] = $cat_uid;
|
||||
$dataList['process'] = $pro_uid;
|
||||
$dataList['search'] = $search;
|
||||
$oCases = new \BusinessModel\Cases();
|
||||
$response = $oCases->getList($dataList);
|
||||
@@ -398,8 +398,8 @@ class Cases extends Api
|
||||
* @param string $start {@from path}
|
||||
* @param string $limit {@from path}
|
||||
* @param string $dir {@from path}
|
||||
* @param string $category {@from path}
|
||||
* @param string $process {@from path}
|
||||
* @param string $cat_uid {@from path}
|
||||
* @param string $pro_uid {@from path}
|
||||
* @param string $search {@from path}
|
||||
* @return array
|
||||
*
|
||||
@@ -413,8 +413,8 @@ class Cases extends Api
|
||||
$limit = 25,
|
||||
$sort = 'APP_CACHE_VIEW.APP_NUMBER',
|
||||
$dir = 'DESC',
|
||||
$category = '',
|
||||
$process = '',
|
||||
$cat_uid = '',
|
||||
$pro_uid = '',
|
||||
$search = ''
|
||||
)
|
||||
{
|
||||
@@ -427,8 +427,8 @@ class Cases extends Api
|
||||
$dataList['limit'] = $limit;
|
||||
$dataList['sort'] = $sort;
|
||||
$dataList['dir'] = $dir;
|
||||
$dataList['category'] = $category;
|
||||
$dataList['process'] = $process;
|
||||
$dataList['category'] = $cat_uid;
|
||||
$dataList['process'] = $pro_uid;
|
||||
$dataList['search'] = $search;
|
||||
$oCases = new \BusinessModel\Cases();
|
||||
$response = $oCases->getList($dataList);
|
||||
@@ -445,8 +445,8 @@ class Cases extends Api
|
||||
* @param string $start {@from path}
|
||||
* @param string $limit {@from path}
|
||||
* @param string $dir {@from path}
|
||||
* @param string $category {@from path}
|
||||
* @param string $process {@from path}
|
||||
* @param string $cat_uid {@from path}
|
||||
* @param string $pro_uid {@from path}
|
||||
* @param string $search {@from path}
|
||||
* @return array
|
||||
*
|
||||
@@ -460,8 +460,8 @@ class Cases extends Api
|
||||
$limit = 25,
|
||||
$sort = 'APP_CACHE_VIEW.APP_NUMBER',
|
||||
$dir = 'DESC',
|
||||
$category = '',
|
||||
$process = '',
|
||||
$cat_uid = '',
|
||||
$pro_uid = '',
|
||||
$search = ''
|
||||
)
|
||||
{
|
||||
@@ -474,8 +474,8 @@ class Cases extends Api
|
||||
$dataList['limit'] = $limit;
|
||||
$dataList['sort'] = $sort;
|
||||
$dataList['dir'] = $dir;
|
||||
$dataList['category'] = $category;
|
||||
$dataList['process'] = $process;
|
||||
$dataList['category'] = $cat_uid;
|
||||
$dataList['process'] = $pro_uid;
|
||||
$dataList['search'] = $search;
|
||||
$oCases = new \BusinessModel\Cases();
|
||||
$response = $oCases->getList($dataList);
|
||||
@@ -492,9 +492,9 @@ class Cases extends Api
|
||||
* @param string $start {@from path}
|
||||
* @param string $limit {@from path}
|
||||
* @param string $dir {@from path}
|
||||
* @param string $category {@from path}
|
||||
* @param string $process {@from path}
|
||||
* @param string $status {@from path}
|
||||
* @param string $cat_uid {@from path}
|
||||
* @param string $pro_uid {@from path}
|
||||
* @param string $app_status {@from path}
|
||||
* @param string $user {@from path}
|
||||
* @param string $dateFrom {@from path}
|
||||
* @param string $dateTo {@from path}
|
||||
@@ -511,9 +511,9 @@ class Cases extends Api
|
||||
$limit = 25,
|
||||
$sort = 'APP_CACHE_VIEW.APP_NUMBER',
|
||||
$dir = 'DESC',
|
||||
$category = '',
|
||||
$process = '',
|
||||
$status = '',
|
||||
$cat_uid = '',
|
||||
$pro_uid = '',
|
||||
$app_status = '',
|
||||
$user = '',
|
||||
$dateFrom = '',
|
||||
$dateTo = '',
|
||||
@@ -529,9 +529,9 @@ class Cases extends Api
|
||||
$dataList['limit'] = $limit;
|
||||
$dataList['sort'] = $sort;
|
||||
$dataList['dir'] = $dir;
|
||||
$dataList['category'] = $category;
|
||||
$dataList['process'] = $process;
|
||||
$dataList['status'] = $status;
|
||||
$dataList['category'] = $cat_uid;
|
||||
$dataList['process'] = $pro_uid;
|
||||
$dataList['status'] = $app_status;
|
||||
$dataList['user'] = $user;
|
||||
$dataList['dateFrom'] = $dateFrom;
|
||||
$dataList['dateTo'] = $dateTo;
|
||||
@@ -551,10 +551,10 @@ class Cases extends Api
|
||||
* @param string $start {@from path}
|
||||
* @param string $limit {@from path}
|
||||
* @param string $dir {@from path}
|
||||
* @param string $category {@from path}
|
||||
* @param string $process {@from path}
|
||||
* @param string $status {@from path}
|
||||
* @param string $user {@from path}
|
||||
* @param string $cat_uid {@from path}
|
||||
* @param string $pro_uid {@from path}
|
||||
* @param string $app_status {@from path}
|
||||
* @param string $usr_uid {@from path}
|
||||
* @param string $dateFrom {@from path}
|
||||
* @param string $dateTo {@from path}
|
||||
* @param string $search {@from path}
|
||||
@@ -567,15 +567,15 @@ class Cases extends Api
|
||||
*/
|
||||
public function doGetCasesListAdvancedSearchPaged(
|
||||
$start = 0,
|
||||
$limit = 25,
|
||||
$limit = 'config',
|
||||
$sort = 'APP_CACHE_VIEW.APP_NUMBER',
|
||||
$dir = 'DESC',
|
||||
$category = '',
|
||||
$process = '',
|
||||
$status = '',
|
||||
$user = '',
|
||||
$dateFrom = '',
|
||||
$dateTo = '',
|
||||
$cat_uid = '',
|
||||
$pro_uid = '',
|
||||
$app_status = '',
|
||||
$usr_uid = '',
|
||||
$date_from = '',
|
||||
$date_to = '',
|
||||
$search = ''
|
||||
)
|
||||
{
|
||||
@@ -588,12 +588,12 @@ class Cases extends Api
|
||||
$dataList['limit'] = $limit;
|
||||
$dataList['sort'] = $sort;
|
||||
$dataList['dir'] = $dir;
|
||||
$dataList['category'] = $category;
|
||||
$dataList['process'] = $process;
|
||||
$dataList['status'] = $status;
|
||||
$dataList['user'] = $user;
|
||||
$dataList['dateFrom'] = $dateFrom;
|
||||
$dataList['dateTo'] = $dateTo;
|
||||
$dataList['category'] = $cat_uid;
|
||||
$dataList['process'] = $pro_uid;
|
||||
$dataList['status'] = $app_status;
|
||||
$dataList['user'] = $usr_uid;
|
||||
$dataList['dateFrom'] = $date_from;
|
||||
$dataList['dateTo'] = $date_to;
|
||||
$dataList['search'] = $search;
|
||||
$oCases = new \BusinessModel\Cases();
|
||||
$response = $oCases->getList($dataList);
|
||||
@@ -664,6 +664,7 @@ class Cases extends Api
|
||||
* @param string $usr_uid {@from body} {@min 32}{@max 32}
|
||||
* @param string $tas_uid {@from body} {@min 32}{@max 32}
|
||||
* @param array $variables {@from body}
|
||||
*
|
||||
*/
|
||||
public function doPostCaseImpersonate($pro_uid, $usr_uid, $tas_uid, $variables=null)
|
||||
{
|
||||
|
||||
@@ -228,7 +228,7 @@ class CasesTest extends \PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testUpdateReassignCase(array $aResponse)
|
||||
{
|
||||
$response = $this->oCases->updateReassignCase($aResponse['app_uid'], '00000000000000000000000000000001', null, '00000000000000000000000000000001', '23063198853206b666e2bd0085065170');
|
||||
$response = $this->oCases->updateReassignCase($aResponse['app_uid'], '00000000000000000000000000000001', null, '00000000000000000000000000000001', '73005191052d56727901138030694610');
|
||||
$this->assertTrue(empty($response));
|
||||
}
|
||||
|
||||
@@ -263,7 +263,7 @@ class CasesTest extends \PHPUnit_Framework_TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* Test add Case impersonate to test route case
|
||||
* Test add Case impersonate
|
||||
*
|
||||
* @covers \BusinessModel\Cases::addCaseImpersonate
|
||||
*
|
||||
@@ -271,9 +271,8 @@ class CasesTest extends \PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testAddCaseImpersonate()
|
||||
{
|
||||
$response = $this->oCases->addCaseImpersonate('1265557095225ff5c688f46031700471', '23063198853206b666e2bd0085065170', '46941969352af5be2ab3f39001216717', array('name' => 'John', 'lastname' => 'Petersson'));
|
||||
$response = $this->oCases->addCaseImpersonate('1265557095225ff5c688f46031700471', '73005191052d56727901138030694610', '46941969352af5be2ab3f39001216717', array(array('name' => 'John', 'lastname' => 'Petersson')));
|
||||
$this->assertTrue(is_object($response));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -449,7 +449,7 @@ EditPMTable = function(){
|
||||
if (row.data.TYPE != 'CLASSIC') {
|
||||
tableType = row.data.PRO_UID ? 'report' : 'table';
|
||||
proParam = PRO_UID !== false ? '&PRO_UID='+PRO_UID : '';
|
||||
location.href = 'pmTables/edit?id='+row.data.ADD_TAB_UID+'&tableType=' + tableType + proParam;
|
||||
location.href = 'pmTables/edit?id='+row.data.ADD_TAB_UID+'&flagProcessmap='+flagProcessmap+'&tableType=' + tableType + proParam;
|
||||
}
|
||||
else { //edit old report table
|
||||
location.href = 'reportTables/reportTables_Edit?REP_TAB_UID='+row.data.ADD_TAB_UID
|
||||
@@ -498,6 +498,10 @@ DeletePMTable = function() {
|
||||
Ext.Msg.alert( _('ID_ERROR'), resp.result.message);
|
||||
}
|
||||
});
|
||||
editButton.disable();
|
||||
deleteButton.disable();
|
||||
exportButton.disable();
|
||||
dataButton.disable();
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user