From 8c7572280191c46a35914a03a844a0637de6252f Mon Sep 17 00:00:00 2001 From: Paula Quispe Date: Thu, 15 Jul 2021 12:27:44 -0400 Subject: [PATCH] PMCORE-3087 --- .../BusinessModel/Cases/AbstractCasesTest.php | 159 +++++++++--------- .../BusinessModel/Cases/DraftTest.php | 3 - .../BusinessModel/Cases/InboxTest.php | 3 - .../BusinessModel/Cases/SupervisingTest.php | 3 - .../src/ProcessMaker/Model/DelegationTest.php | 64 +++++++ .../BusinessModel/Cases/AbstractCases.php | 106 +++++++++--- .../BusinessModel/Cases/Search.php | 12 ++ .../src/ProcessMaker/Model/Delegation.php | 50 ++++++ .../src/ProcessMaker/Services/Api/Home.php | 6 + 9 files changed, 296 insertions(+), 110 deletions(-) diff --git a/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/Cases/AbstractCasesTest.php b/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/Cases/AbstractCasesTest.php index f46714b6d..7b2966297 100644 --- a/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/Cases/AbstractCasesTest.php +++ b/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/Cases/AbstractCasesTest.php @@ -21,6 +21,22 @@ class AbstractCasesTest extends TestCase { 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 * @@ -28,7 +44,7 @@ class AbstractCasesTest extends TestCase * @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::getCategoryUid() * @test */ - public function it_return_set_get_category() + public function it_return_set_get_category_uid() { $category = factory(ProcessCategory::class)->create(); $absCases = new AbstractCases(); @@ -95,6 +111,38 @@ class AbstractCasesTest extends TestCase $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 * @@ -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::getOrderByColumn() @@ -593,6 +641,20 @@ class AbstractCasesTest extends TestCase $absCases->setOrderByColumn($text); $actual = $absCases->getOrderByColumn(); $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::setCaseNumber() * @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::setCaseTitle() - * @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::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::setCasesNumbers() + * @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::setRangeCasesFromTo() * @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::setCaseUid() * @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::setCasesUids() * @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::setOffset() * @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::getCasesUids() * @covers \ProcessMaker\BusinessModel\Cases\AbstractCases::getOrderByColumn() @@ -764,23 +803,13 @@ class AbstractCasesTest extends TestCase { $absCases = new AbstractCases(); $properties = [ - // Tasks - Cases + // Filters that works for all list 'process' => rand(), 'task' => rand(), 'user' => rand(), 'caseNumber' => rand(), 'caseTitle' => G::generateUniqueID(), - // Home - Search - 'caseStatuses' => ['TO_DO','DRAFT'], '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(), 'appUidCheck' => [G::generateUniqueID()], 'sort' => 'APP_NUMBER', @@ -801,37 +830,10 @@ class AbstractCasesTest extends TestCase $this->assertEquals($properties['caseNumber'], $actual); $actual = $absCases->getCaseTitle(); $this->assertEquals($properties['caseTitle'], $actual); - // Home - Search - $actual = $absCases->getCaseStatuses(); - $this->assertNotEmpty($actual); - $actual = $absCases->getFilterCases(); - $this->assertEmpty($actual); $actual = $absCases->getCasesNumbers(); - $this->assertEmpty($actual); + $this->assertNotEmpty($actual); $actual = $absCases->getRangeCasesFromTo(); - $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); - // 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 + $this->assertNotEmpty($actual); $actual = $absCases->getCaseUid(); $this->assertEquals($properties['caseLink'], $actual); $actual = $absCases->getCasesUids(); @@ -858,8 +860,15 @@ class AbstractCasesTest extends TestCase { $absCases = new AbstractCases(); $dueDate = date('Y-m-d'); + // Review overdue $result = $absCases->getTaskColor($dueDate); $this->assertNotEmpty($result); + + $absCases = new AbstractCases(); + $dueDate = date('Y-m-d'); + // Review on-time + $result = $absCases->getTaskColor($dueDate,'' ,'2000-01-01'); + $this->assertNotEmpty($result); } /** diff --git a/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/Cases/DraftTest.php b/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/Cases/DraftTest.php index b8f0eb086..7029dc715 100644 --- a/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/Cases/DraftTest.php +++ b/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/Cases/DraftTest.php @@ -262,9 +262,6 @@ class DraftTest extends TestCase 'APP_NUMBER', 'DEL_TITLE', 'PRO_TITLE', - 'TAS_TITLE', - 'DEL_TASK_DUE_DATE', - 'DEL_DELEGATE_DATE' ]; $index = array_rand($columnsView); // Create new Inbox object diff --git a/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/Cases/InboxTest.php b/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/Cases/InboxTest.php index ea7088534..9619330db 100644 --- a/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/Cases/InboxTest.php +++ b/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/Cases/InboxTest.php @@ -257,9 +257,6 @@ class InboxTest extends TestCase 'APP_NUMBER', 'DEL_TITLE', 'PRO_TITLE', - 'TAS_TITLE', - 'DEL_TASK_DUE_DATE', - 'DEL_DELEGATE_DATE' ]; $index = array_rand($columnsView); // Create new Inbox object diff --git a/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/Cases/SupervisingTest.php b/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/Cases/SupervisingTest.php index 27f54c809..1a75830ae 100644 --- a/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/Cases/SupervisingTest.php +++ b/tests/unit/workflow/engine/src/ProcessMaker/BusinessModel/Cases/SupervisingTest.php @@ -675,9 +675,6 @@ class SupervisingTest extends TestCase 'APP_NUMBER', 'DEL_TITLE', 'PRO_TITLE', - 'TAS_TITLE', - 'APP_CREATE_DATE', - 'APP_FINISH_DATE' ]; $index = array_rand($columnsView); // Instance the Supervising object diff --git a/tests/unit/workflow/engine/src/ProcessMaker/Model/DelegationTest.php b/tests/unit/workflow/engine/src/ProcessMaker/Model/DelegationTest.php index 4a124c8ab..0a8b58a1b 100644 --- a/tests/unit/workflow/engine/src/ProcessMaker/Model/DelegationTest.php +++ b/tests/unit/workflow/engine/src/ProcessMaker/Model/DelegationTest.php @@ -463,6 +463,20 @@ class DelegationTest extends TestCase $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 * @@ -549,6 +563,18 @@ class DelegationTest extends TestCase $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 * @@ -639,6 +665,18 @@ class DelegationTest extends TestCase $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 * @@ -3208,4 +3246,30 @@ class DelegationTest extends TestCase // Assert the result is true $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); + } } \ No newline at end of file diff --git a/workflow/engine/src/ProcessMaker/BusinessModel/Cases/AbstractCases.php b/workflow/engine/src/ProcessMaker/BusinessModel/Cases/AbstractCases.php index 52afbf0f6..bc279d8c9 100644 --- a/workflow/engine/src/ProcessMaker/BusinessModel/Cases/AbstractCases.php +++ b/workflow/engine/src/ProcessMaker/BusinessModel/Cases/AbstractCases.php @@ -58,6 +58,12 @@ class AbstractCases implements CasesInterface // Filter by user using the Id field 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 private $valueToSearch = ''; @@ -282,6 +288,46 @@ class AbstractCases implements CasesInterface 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 * @@ -1294,6 +1340,34 @@ class AbstractCases implements CasesInterface if (!empty($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 */ // Filter date related to delegate from 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'])) { $this->setFinishCaseTo($properties['finishCaseTo']); } - // Filter by case uid - if (!empty($properties['caseLink'])) { - $this->setCaseUid($properties['caseLink']); + // Filter date related to user who started + if (get_class($this) === Search::class && !empty($properties['userCompleted'])) { + $this->setUserCompletedId($properties['userCompleted']); } - // 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']); + // Filter date related to user who completed + if (get_class($this) === Search::class && !empty($properties['userStarted'])) { + $this->setUserStartedId($properties['userStarted']); } } diff --git a/workflow/engine/src/ProcessMaker/BusinessModel/Cases/Search.php b/workflow/engine/src/ProcessMaker/BusinessModel/Cases/Search.php index 84085fc12..2c3b4bf01 100644 --- a/workflow/engine/src/ProcessMaker/BusinessModel/Cases/Search.php +++ b/workflow/engine/src/ProcessMaker/BusinessModel/Cases/Search.php @@ -88,6 +88,18 @@ class Search extends AbstractCases // Get only the open threads related to the user $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 if ($this->getTaskId()) { // Join with delegation diff --git a/workflow/engine/src/ProcessMaker/Model/Delegation.php b/workflow/engine/src/ProcessMaker/Model/Delegation.php index 16cf27c25..c74085a02 100644 --- a/workflow/engine/src/ProcessMaker/Model/Delegation.php +++ b/workflow/engine/src/ProcessMaker/Model/Delegation.php @@ -2008,4 +2008,54 @@ class Delegation extends Model } 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(); + } } diff --git a/workflow/engine/src/ProcessMaker/Services/Api/Home.php b/workflow/engine/src/ProcessMaker/Services/Api/Home.php index 62a9c7c63..5d8606bae 100644 --- a/workflow/engine/src/ProcessMaker/Services/Api/Home.php +++ b/workflow/engine/src/ProcessMaker/Services/Api/Home.php @@ -464,6 +464,8 @@ class Home extends Api * @param int $process * @param int $task * @param int $user + * @param int $userCompleted + * @param int $userStarted * @param string $caseTitle * @param string $caseStatuses * @param string $filterCases @@ -487,6 +489,8 @@ class Home extends Api int $process = 0, int $task = 0, int $user = 0, + int $userCompleted = 0, + int $userStarted = 0, string $caseTitle = '', string $caseStatuses = '', string $filterCases = '', @@ -507,6 +511,8 @@ class Home extends Api $properties['process'] = $process; $properties['task'] = $task; $properties['user'] = $user; + $properties['userCompleted'] = $userCompleted; + $properties['userStarted'] = $userStarted; $properties['caseStatuses'] = explode(',', $caseStatuses); $properties['filterCases'] = $filterCases; $properties['startCaseFrom'] = $startCaseFrom;