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