Merged in bugfix/PMCORE-3087 (pull request #7987)

PMCORE-3087

Approved-by: Julio Cesar Laura Avendaño
This commit is contained in:
Paula Quispe
2021-07-21 14:59:34 +00:00
committed by Julio Cesar Laura Avendaño
9 changed files with 296 additions and 110 deletions

View File

@@ -21,6 +21,22 @@ class AbstractCasesTest extends TestCase
{ {
use DatabaseTransactions; use DatabaseTransactions;
/**
* This check the getter and setter related to the category
*
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::setCategoryId()
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::getCategoryId()
* @test
*/
public function it_return_set_get_category()
{
$category = factory(ProcessCategory::class)->create();
$absCases = new AbstractCases();
$absCases->setCategoryId($category->CATEGORY_ID);
$actual = $absCases->getCategoryId();
$this->assertEquals($category->CATEGORY_ID, $actual);
}
/** /**
* This check the getter and setter related to the category * This check the getter and setter related to the category
* *
@@ -28,7 +44,7 @@ class AbstractCasesTest extends TestCase
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::getCategoryUid() * @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::getCategoryUid()
* @test * @test
*/ */
public function it_return_set_get_category() public function it_return_set_get_category_uid()
{ {
$category = factory(ProcessCategory::class)->create(); $category = factory(ProcessCategory::class)->create();
$absCases = new AbstractCases(); $absCases = new AbstractCases();
@@ -95,6 +111,38 @@ class AbstractCasesTest extends TestCase
$this->assertEquals($users->USR_ID, $actual); $this->assertEquals($users->USR_ID, $actual);
} }
/**
* This check the getter and setter related to the user completed
*
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::setUserCompletedId()
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::getUserCompletedId()
* @test
*/
public function it_return_set_get_user_completed()
{
$users = factory(User::class)->create();
$absCases = new AbstractCases();
$absCases->setUserCompletedId($users->USR_ID);
$actual = $absCases->getUserCompletedId();
$this->assertEquals($users->USR_ID, $actual);
}
/**
* This check the getter and setter related to the user started
*
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::setUserStartedId()
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::getUserStartedId()
* @test
*/
public function it_return_set_get_user_started()
{
$users = factory(User::class)->create();
$absCases = new AbstractCases();
$absCases->setUserStartedId($users->USR_ID);
$actual = $absCases->getUserStartedId();
$this->assertEquals($users->USR_ID, $actual);
}
/** /**
* This check the getter and setter related to the priority * This check the getter and setter related to the priority
* *
@@ -580,7 +628,7 @@ class AbstractCasesTest extends TestCase
} }
/** /**
* This check the getter and setter related to the oldest than date * This check the getter and setter related to the order by column
* *
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::setOrderByColumn() * @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::setOrderByColumn()
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::getOrderByColumn() * @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::getOrderByColumn()
@@ -593,6 +641,20 @@ class AbstractCasesTest extends TestCase
$absCases->setOrderByColumn($text); $absCases->setOrderByColumn($text);
$actual = $absCases->getOrderByColumn(); $actual = $absCases->getOrderByColumn();
$this->assertEquals($text, $actual); $this->assertEquals($text, $actual);
}
/**
* This test the exception setOrderByColumn
*
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::setOrderByColumn()
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::getOrderByColumn()
* @test
*/
public function it_return_exception_order_by_column()
{
$this->expectException(Exception::class);
$absCases = new AbstractCases();
$absCases->setOrderByColumn('INVALID');
} }
/** /**
@@ -711,39 +773,8 @@ class AbstractCasesTest extends TestCase
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::setUserId() * @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::setUserId()
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::setCaseNumber() * @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::setCaseNumber()
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::setCaseTitle() * @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::setCaseTitle()
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::getProcessId() * @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::setCasesNumbers()
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::getTaskId() * @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::setRangeCasesFromTo()
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::getUserId()
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::getCaseNumber()
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::getCaseTitle()
*
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::setParticipatedStatus()
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::setCaseStatus()
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::setStartCaseFrom()
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::setStartCaseTo()
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::setFinishCaseFrom()
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::setFinishCaseTo()
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::getParticipatedStatus()
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::getCaseStatus()
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::getStartCaseFrom()
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::getStartCaseTo()
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::getFinishCaseFrom()
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::getFinishCaseTo()
*
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::setFilterCases()
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::setCaseStatuses()
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::setProperties()
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::setDelegateFrom()
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::setDelegateTo()
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::setDueFrom()
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::setDueTo()
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::getFilterCases()
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::getCaseStatuses()
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::getDelegateFrom()
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::getDelegateTo()
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::getDueFrom()
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::getDueTo()
*
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::setCaseUid() * @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::setCaseUid()
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::setCasesUids() * @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::setCasesUids()
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::setOrderByColumn() * @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::setOrderByColumn()
@@ -751,6 +782,14 @@ class AbstractCasesTest extends TestCase
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::setPaged() * @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::setPaged()
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::setOffset() * @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::setOffset()
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::setLimit() * @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::setLimit()
*
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::getProcessId()
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::getTaskId()
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::getUserId()
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::getCaseNumber()
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::getCaseTitle()
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::getCasesNumbers()
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::getRangeCasesFromTo()
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::getCaseUid() * @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::getCaseUid()
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::getCasesUids() * @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::getCasesUids()
* @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::getOrderByColumn() * @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::getOrderByColumn()
@@ -764,23 +803,13 @@ class AbstractCasesTest extends TestCase
{ {
$absCases = new AbstractCases(); $absCases = new AbstractCases();
$properties = [ $properties = [
// Tasks - Cases // Filters that works for all list
'process' => rand(), 'process' => rand(),
'task' => rand(), 'task' => rand(),
'user' => rand(), 'user' => rand(),
'caseNumber' => rand(), 'caseNumber' => rand(),
'caseTitle' => G::generateUniqueID(), 'caseTitle' => G::generateUniqueID(),
// Home - Search
'caseStatuses' => ['TO_DO','DRAFT'],
'filterCases'=> '1,3-5,8,10-15', 'filterCases'=> '1,3-5,8,10-15',
// Home - My cases
'filter'=> 'STARTED',
'caseStatus' => 'TO_DO',
'startCaseFrom' => date('Y-m-d'),
'startCaseTo' => date('Y-m-d'),
'finishCaseFrom' => date('Y-m-d'),
'finishCaseTo' => date('Y-m-d'),
// Other
'caseLink' => G::generateUniqueID(), 'caseLink' => G::generateUniqueID(),
'appUidCheck' => [G::generateUniqueID()], 'appUidCheck' => [G::generateUniqueID()],
'sort' => 'APP_NUMBER', 'sort' => 'APP_NUMBER',
@@ -801,37 +830,10 @@ class AbstractCasesTest extends TestCase
$this->assertEquals($properties['caseNumber'], $actual); $this->assertEquals($properties['caseNumber'], $actual);
$actual = $absCases->getCaseTitle(); $actual = $absCases->getCaseTitle();
$this->assertEquals($properties['caseTitle'], $actual); $this->assertEquals($properties['caseTitle'], $actual);
// Home - Search
$actual = $absCases->getCaseStatuses();
$this->assertNotEmpty($actual);
$actual = $absCases->getFilterCases();
$this->assertEmpty($actual);
$actual = $absCases->getCasesNumbers(); $actual = $absCases->getCasesNumbers();
$this->assertEmpty($actual); $this->assertNotEmpty($actual);
$actual = $absCases->getRangeCasesFromTo(); $actual = $absCases->getRangeCasesFromTo();
$this->assertEmpty($actual); $this->assertNotEmpty($actual);
$actual = $absCases->getStartCaseFrom();
$this->assertEmpty($actual);
$actual = $absCases->getStartCaseTo();
$this->assertEmpty($actual);
$actual = $absCases->getFinishCaseFrom();
$this->assertEmpty($actual);
$actual = $absCases->getFinishCaseTo();
$this->assertEmpty($actual);
// Home - My cases
$actual = $absCases->getParticipatedStatus();
$this->assertEmpty($actual);
$actual = $absCases->getCaseStatus();
$this->assertEmpty($actual);
$actual = $absCases->getStartCaseFrom();
$this->assertEmpty($actual);
$actual = $absCases->getStartCaseTo();
$this->assertEmpty($actual);
$actual = $absCases->getFinishCaseFrom();
$this->assertEmpty($actual);
$actual = $absCases->getFinishCaseTo();
$this->assertEmpty($actual);
// Other
$actual = $absCases->getCaseUid(); $actual = $absCases->getCaseUid();
$this->assertEquals($properties['caseLink'], $actual); $this->assertEquals($properties['caseLink'], $actual);
$actual = $absCases->getCasesUids(); $actual = $absCases->getCasesUids();
@@ -858,8 +860,15 @@ class AbstractCasesTest extends TestCase
{ {
$absCases = new AbstractCases(); $absCases = new AbstractCases();
$dueDate = date('Y-m-d'); $dueDate = date('Y-m-d');
// Review overdue
$result = $absCases->getTaskColor($dueDate); $result = $absCases->getTaskColor($dueDate);
$this->assertNotEmpty($result); $this->assertNotEmpty($result);
$absCases = new AbstractCases();
$dueDate = date('Y-m-d');
// Review on-time
$result = $absCases->getTaskColor($dueDate,'' ,'2000-01-01');
$this->assertNotEmpty($result);
} }
/** /**

View File

@@ -263,9 +263,6 @@ class DraftTest extends TestCase
'APP_NUMBER', 'APP_NUMBER',
'DEL_TITLE', 'DEL_TITLE',
'PRO_TITLE', 'PRO_TITLE',
'TAS_TITLE',
'DEL_TASK_DUE_DATE',
'DEL_DELEGATE_DATE'
]; ];
$index = array_rand($columnsView); $index = array_rand($columnsView);
// Create new Inbox object // Create new Inbox object

View File

@@ -256,9 +256,6 @@ class InboxTest extends TestCase
'APP_NUMBER', 'APP_NUMBER',
'DEL_TITLE', 'DEL_TITLE',
'PRO_TITLE', 'PRO_TITLE',
'TAS_TITLE',
'DEL_TASK_DUE_DATE',
'DEL_DELEGATE_DATE'
]; ];
$index = array_rand($columnsView); $index = array_rand($columnsView);
// Create new Inbox object // Create new Inbox object

View File

@@ -675,9 +675,6 @@ class SupervisingTest extends TestCase
'APP_NUMBER', 'APP_NUMBER',
'DEL_TITLE', 'DEL_TITLE',
'PRO_TITLE', 'PRO_TITLE',
'TAS_TITLE',
'APP_CREATE_DATE',
'APP_FINISH_DATE'
]; ];
$index = array_rand($columnsView); $index = array_rand($columnsView);
// Instance the Supervising object // Instance the Supervising object

View File

@@ -463,6 +463,20 @@ class DelegationTest extends TestCase
$this->assertCount(1, $table->positiveCases()->get()); $this->assertCount(1, $table->positiveCases()->get());
} }
/**
* This test scopeCasesOrRangeOfCases
*
* @covers \ProcessMaker\Model\Delegation::scopeCasesOrRangeOfCases()
* @test
*/
public function it_return_scope_cases_and_range_of_cases()
{
$table = factory(Delegation::class)->states('foreign_keys')->create();
$cases = [$table->APP_NUMBER];
$rangeCases = [$table->APP_NUMBER.'-'.$table->APP_NUMBER];
$this->assertCount(1, $table->casesOrRangeOfCases($cases, $rangeCases)->get());
}
/** /**
* This test scopeRangeOfCases * This test scopeRangeOfCases
* *
@@ -549,6 +563,18 @@ class DelegationTest extends TestCase
$this->assertCount(1, $table->processId($table->PRO_ID)->get()); $this->assertCount(1, $table->processId($table->PRO_ID)->get());
} }
/**
* This test scopeTask
*
* @covers \ProcessMaker\Model\Delegation::scopeTask()
* @test
*/
public function it_return_scope_task_id()
{
$table = factory(Delegation::class)->states('foreign_keys')->create();
$this->assertCount(1, $table->task($table->TAS_ID)->get());
}
/** /**
* This test scopeTask * This test scopeTask
* *
@@ -639,6 +665,18 @@ class DelegationTest extends TestCase
$this->assertCount(1, $table->processInList([$table->PRO_ID])->get()); $this->assertCount(1, $table->processInList([$table->PRO_ID])->get());
} }
/**
* This test scopeParticipated
*
* @covers \ProcessMaker\Model\Delegation::scopeParticipated()
* @test
*/
public function it_return_scope_participated()
{
$table = factory(Delegation::class)->states('foreign_keys')->create();
$this->assertCount(1, $table->participated($table->USR_ID)->get());
}
/** /**
* This test scopeJoinCategoryProcess * This test scopeJoinCategoryProcess
* *
@@ -3208,4 +3246,30 @@ class DelegationTest extends TestCase
// Assert the result is true // Assert the result is true
$this->assertTrue($res); $this->assertTrue($res);
} }
/**
* This check the return cases completed by specific user
*
* @covers \ProcessMaker\Model\Delegation::casesCompletedBy()
* @test
*/
public function it_get_cases_completed_by_specific_user()
{
$delegation = factory(Delegation::class)->states('foreign_keys')->create();
$result = Delegation::casesCompletedBy($delegation->USR_ID);
$this->assertEmpty($result);
}
/**
* This check the return cases completed by specific user
*
* @covers \ProcessMaker\Model\Delegation::casesStartedBy()
* @test
*/
public function it_get_cases_started_by_specific_user()
{
$delegation = factory(Delegation::class)->states('foreign_keys')->create();
$result = Delegation::casesStartedBy($delegation->USR_ID);
$this->assertNotEmpty($result);
}
} }

View File

@@ -58,6 +58,12 @@ class AbstractCases implements CasesInterface
// Filter by user using the Id field // Filter by user using the Id field
private $userId = 0; private $userId = 0;
// Filter by user who completed using the Id field
private $userCompleted = 0;
// Filter by user who started using the Id field
private $userStarted = 0;
// Value to search, can be a text or an application number, know as "$search" in the old lists classes // Value to search, can be a text or an application number, know as "$search" in the old lists classes
private $valueToSearch = ''; private $valueToSearch = '';
@@ -282,6 +288,46 @@ class AbstractCases implements CasesInterface
return $this->userId; return $this->userId;
} }
/**
* Set User Id value
*
* @param int $userId
*/
public function setUserCompletedId(int $userId)
{
$this->userCompleted = $userId;
}
/**
* Get User Id value
*
* @return int
*/
public function getUserCompletedId()
{
return $this->userCompleted;
}
/**
* Set User Id value
*
* @param int $userId
*/
public function setUserStartedId(int $userId)
{
$this->userStarted = $userId;
}
/**
* Get User Id value
*
* @return int
*/
public function getUserStartedId()
{
return $this->userStarted;
}
/** /**
* Set value to search * Set value to search
* *
@@ -1294,6 +1340,34 @@ class AbstractCases implements CasesInterface
if (!empty($properties['caseTitle'])) { if (!empty($properties['caseTitle'])) {
$this->setCaseTitle($properties['caseTitle']); $this->setCaseTitle($properties['caseTitle']);
} }
// Filter by case uid
if (!empty($properties['caseLink'])) {
$this->setCaseUid($properties['caseLink']);
}
// Filter by array of case uids
if (!empty($properties['appUidCheck'])) {
$this->setCasesUids($properties['appUidCheck']);
}
// Sort column
if (!empty($properties['sort'])) {
$this->setOrderByColumn($properties['sort']);
}
// Direction column
if (!empty($properties['dir'])) {
$this->setOrderDirection($properties['dir']);
}
// Paged
if (!empty($properties['paged'])) {
$this->setPaged($properties['paged']);
}
// Start
if (!empty($properties['start'])) {
$this->setOffset($properties['start']);
}
// Limit
if (!empty($properties['limit'])) {
$this->setLimit($properties['limit']);
}
/** Apply filters related to INBOX */ /** Apply filters related to INBOX */
// Filter date related to delegate from // Filter date related to delegate from
if (get_class($this) === Inbox::class && !empty($properties['delegateFrom'])) { if (get_class($this) === Inbox::class && !empty($properties['delegateFrom'])) {
@@ -1372,33 +1446,13 @@ class AbstractCases implements CasesInterface
if (get_class($this) === Search::class && !empty($properties['finishCaseTo'])) { if (get_class($this) === Search::class && !empty($properties['finishCaseTo'])) {
$this->setFinishCaseTo($properties['finishCaseTo']); $this->setFinishCaseTo($properties['finishCaseTo']);
} }
// Filter by case uid // Filter date related to user who started
if (!empty($properties['caseLink'])) { if (get_class($this) === Search::class && !empty($properties['userCompleted'])) {
$this->setCaseUid($properties['caseLink']); $this->setUserCompletedId($properties['userCompleted']);
} }
// Filter by array of case uids // Filter date related to user who completed
if (!empty($properties['appUidCheck'])) { if (get_class($this) === Search::class && !empty($properties['userStarted'])) {
$this->setCasesUids($properties['appUidCheck']); $this->setUserStartedId($properties['userStarted']);
}
// Sort column
if (!empty($properties['sort'])) {
$this->setOrderByColumn($properties['sort']);
}
// Direction column
if (!empty($properties['dir'])) {
$this->setOrderDirection($properties['dir']);
}
// Paged
if (!empty($properties['paged'])) {
$this->setPaged($properties['paged']);
}
// Start
if (!empty($properties['start'])) {
$this->setOffset($properties['start']);
}
// Limit
if (!empty($properties['limit'])) {
$this->setLimit($properties['limit']);
} }
} }

View File

@@ -88,6 +88,18 @@ class Search extends AbstractCases
// Get only the open threads related to the user // Get only the open threads related to the user
$query->where('APP_DELEGATION.DEL_THREAD_STATUS', '=', 'OPEN'); $query->where('APP_DELEGATION.DEL_THREAD_STATUS', '=', 'OPEN');
} }
// Filter by user who started
if ($this->getUserStartedId()) {
// Get the case numbers related to this filter
$result = Delegation::casesStartedBy($this->getUserStartedId(), $this->getOffset(), $this->getLimit());
$query->specificCases($result);
}
// Filter by user who completed
if ($this->getUserCompletedId()) {
// Get the case numbers related to this filter
$result = Delegation::casesCompletedBy($this->getUserCompletedId(), $this->getOffset(), $this->getLimit());
$query->specificCases($result);
}
// Filter by task // Filter by task
if ($this->getTaskId()) { if ($this->getTaskId()) {
// Join with delegation // Join with delegation

View File

@@ -2051,4 +2051,54 @@ class Delegation extends Model
} }
return false; return false;
} }
/**
* Get cases completed by specific user
*
* @param int $userId
* @param int $offset
* @param int $limit
*
* @return array
*/
public static function casesCompletedBy(int $userId, int $offset = 0, int $limit = 15)
{
// Get the case numbers related to this filter
$query = Delegation::query()->select(['APP_NUMBER']);
// Filter the user
$query->participated($userId);
// Filter the last thread
$query->lastThread();
// Apply the limit
$query->offset($offset)->limit($limit);
// Get the result
$results = $query->get();
return $results->values()->toArray();
}
/**
* Get cases started by specific user
*
* @param int $userId
* @param int $offset
* @param int $limit
*
* @return array
*/
public static function casesStartedBy(int $userId, int $offset = 0, int $limit = 15)
{
// Get the case numbers related to this filter
$query = Delegation::query()->select(['APP_NUMBER']);
// Filter the user
$query->participated($userId);
// Filter the first thread
$query->caseStarted();
// Apply the limit
$query->offset($offset)->limit($limit);
// Get the result
$results = $query->get();
return $results->values()->toArray();
}
} }

View File

@@ -464,6 +464,8 @@ class Home extends Api
* @param int $process * @param int $process
* @param int $task * @param int $task
* @param int $user * @param int $user
* @param int $userCompleted
* @param int $userStarted
* @param string $caseTitle * @param string $caseTitle
* @param string $caseStatuses * @param string $caseStatuses
* @param string $filterCases * @param string $filterCases
@@ -487,6 +489,8 @@ class Home extends Api
int $process = 0, int $process = 0,
int $task = 0, int $task = 0,
int $user = 0, int $user = 0,
int $userCompleted = 0,
int $userStarted = 0,
string $caseTitle = '', string $caseTitle = '',
string $caseStatuses = '', string $caseStatuses = '',
string $filterCases = '', string $filterCases = '',
@@ -507,6 +511,8 @@ class Home extends Api
$properties['process'] = $process; $properties['process'] = $process;
$properties['task'] = $task; $properties['task'] = $task;
$properties['user'] = $user; $properties['user'] = $user;
$properties['userCompleted'] = $userCompleted;
$properties['userStarted'] = $userStarted;
$properties['caseStatuses'] = explode(',', $caseStatuses); $properties['caseStatuses'] = explode(',', $caseStatuses);
$properties['filterCases'] = $filterCases; $properties['filterCases'] = $filterCases;
$properties['startCaseFrom'] = $startCaseFrom; $properties['startCaseFrom'] = $startCaseFrom;