HOR-2887 problem resolved in unassigned list

This commit is contained in:
Roly Rudy Gutierrez Pinto
2017-05-25 11:51:38 -04:00
parent c017e1fcb1
commit 47e7f8bfd7

View File

@@ -446,25 +446,15 @@ class Home extends Controller
if (true) { if (true) {
//In enterprise version this block of code should always be executed //In enterprise version this block of code should always be executed
//In community version this block of code is deleted and is executed the other //In community version this block of code is deleted and is executed the other
$list = new \ProcessMaker\BusinessModel\Lists(); $swType = $type === "todo" || $type === "draft";
$listName = 'inbox'; if ($swType || $type === "unassigned") {
switch ($type) { //The change is made because the method 'getList()' does not
case 'draft': //support 'USR_UID', this method uses the numeric field 'USR_ID'.
case 'todo': $userObject = Users::loadById($dataList['userId']);
$listName = 'inbox'; $dataList['userId'] = $userObject->getUsrUid();
//The change is made because the method 'getList()' does not $listType = $swType ? "inbox" : $type;
//support 'USR_UID', this method uses the numeric field 'USR_ID'. $list = new \ProcessMaker\BusinessModel\Lists();
$userObject = Users::loadById($dataList['userId']); $cases = $list->getList($listType, $dataList);
$dataList['userId'] = $userObject->getUsrUid();
$cases = $list->getList($listName, $dataList);
break;
case 'unassigned':
$case = new \ProcessMaker\BusinessModel\Cases();
$cases = $case->getList($dataList);
foreach ($cases['data'] as &$value) {
$value = array_change_key_case($value, CASE_UPPER);
}
break;
} }
} else { } else {
/*----------------------------------********---------------------------------*/ /*----------------------------------********---------------------------------*/