From a0ec1a238cc402d8d8f47c9d9c827f01b745cc6d Mon Sep 17 00:00:00 2001 From: "Paula.Quispe" Date: Mon, 18 Apr 2022 11:27:05 -0400 Subject: [PATCH] PMCORE-3695 --- .../src/ProcessMaker/BusinessModel/Cases/Search.php | 4 ++-- .../engine/src/ProcessMaker/Model/Delegation.php | 12 ++---------- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/workflow/engine/src/ProcessMaker/BusinessModel/Cases/Search.php b/workflow/engine/src/ProcessMaker/BusinessModel/Cases/Search.php index 880aed728..6d435df02 100644 --- a/workflow/engine/src/ProcessMaker/BusinessModel/Cases/Search.php +++ b/workflow/engine/src/ProcessMaker/BusinessModel/Cases/Search.php @@ -91,13 +91,13 @@ class Search extends AbstractCases // 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()); + $result = Delegation::casesStartedBy($this->getUserStartedId()); $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()); + $result = Delegation::casesCompletedBy($this->getUserCompletedId()); $query->specificCases($result); } // Filter by task diff --git a/workflow/engine/src/ProcessMaker/Model/Delegation.php b/workflow/engine/src/ProcessMaker/Model/Delegation.php index 56fcb2fd6..de0494c45 100644 --- a/workflow/engine/src/ProcessMaker/Model/Delegation.php +++ b/workflow/engine/src/ProcessMaker/Model/Delegation.php @@ -2131,12 +2131,10 @@ class Delegation extends Model * 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) + public static function casesCompletedBy(int $userId) { // Get the case numbers related to this filter $query = Delegation::query()->select(['APP_NUMBER']); @@ -2144,8 +2142,6 @@ class Delegation extends Model $query->participated($userId); // Filter the last thread $query->lastThread(); - // Apply the limit - $query->offset($offset)->limit($limit); // Get the result $results = $query->get(); @@ -2156,12 +2152,10 @@ class Delegation extends Model * 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) + public static function casesStartedBy(int $userId) { // Get the case numbers related to this filter $query = Delegation::query()->select(['APP_NUMBER']); @@ -2169,8 +2163,6 @@ class Delegation extends Model $query->participated($userId); // Filter the first thread $query->caseStarted(); - // Apply the limit - $query->offset($offset)->limit($limit); // Get the result $results = $query->get();