PMCORE-3832 Custom Case Counters does not provide the correct number nor information PMCORE_3.7.4
This commit is contained in:
@@ -250,7 +250,7 @@ class Unassigned extends AbstractCases
|
||||
{
|
||||
$caseList = CaseList::getCaseList($id, $type);
|
||||
$query = Delegation::query()->select();
|
||||
$query->selfService($this->getUserId());
|
||||
$query->selfService($this->getUserUid());
|
||||
|
||||
$name = '';
|
||||
$description = '';
|
||||
|
||||
@@ -791,18 +791,18 @@ class Delegation extends Model
|
||||
* Scope a self service cases
|
||||
*
|
||||
* @param \Illuminate\Database\Eloquent\Builder $query
|
||||
* @param string $user
|
||||
* @param string $usrUid
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Builder
|
||||
*/
|
||||
public function scopeSelfService($query, $user)
|
||||
public function scopeSelfService($query, string $usrUid)
|
||||
{
|
||||
// Add Join with task filtering only the type self-service
|
||||
$query->taskAssignType('SELF_SERVICE');
|
||||
// Filtering the open threads and without users
|
||||
$query->threadOpen()->withoutUserId();
|
||||
// Filtering the cases unassigned that the user can view
|
||||
$this->casesUnassigned($query, $user);
|
||||
$this->casesUnassigned($query, $usrUid);
|
||||
|
||||
return $query;
|
||||
}
|
||||
@@ -1135,7 +1135,7 @@ class Delegation extends Model
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Builder
|
||||
*/
|
||||
public function casesUnassigned(&$query, $usrUid)
|
||||
public function casesUnassigned(&$query, string $usrUid)
|
||||
{
|
||||
// Get the task self services related to the user
|
||||
$taskSelfService = TaskUser::getSelfServicePerUser($usrUid);
|
||||
|
||||
@@ -62,7 +62,7 @@ class TaskUser extends Model
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getSelfServicePerUser($usrUid)
|
||||
public static function getSelfServicePerUser(string $usrUid)
|
||||
{
|
||||
//Get the groups related to the user
|
||||
$groups = GroupUser::getGroups($usrUid, 'GRP_UID');
|
||||
|
||||
Reference in New Issue
Block a user