Merged in bugfix/PMC-809 (pull request #6918)

PMC-809

Approved-by: Julio Cesar Laura Avendaño <contact@julio-laura.com>
This commit is contained in:
Roly
2019-06-07 14:30:12 +00:00
committed by Julio Cesar Laura Avendaño
5 changed files with 407 additions and 12 deletions

View File

@@ -35,6 +35,14 @@ class ListUnassigned extends Model
return $this->belongsTo(Process::class, 'PRO_ID', 'PRO_ID');
}
/**
* Return the user this belongs to
*/
public function previousUser()
{
return $this->belongsTo(User::class, 'DEL_PREVIOUS_USR_UID', 'USR_UID');
}
/**
* Scope a query to only include specific tasks
*
@@ -93,7 +101,7 @@ class ListUnassigned extends Model
* @param array $filters
*
* @return array
*/
*/
public static function doCount($userUid, $filters = [])
{
$list = new PropelListUnassigned();
@@ -155,4 +163,3 @@ class ListUnassigned extends Model
return $result;
}
}

View File

@@ -652,10 +652,11 @@ class Light extends Api
if (preg_match($this->regexNull, $newerThan)) {
return [];
}
$paged = ($start === 0 && $limit === 0) ? false : true;
$dataList['userId'] = $this->getUserId();
$dataList['action'] = 'unassigned';
$dataList['paged'] = false;
$dataList['paged'] = $paged;
$dataList['start'] = $start;
$dataList['limit'] = $limit;
@@ -682,6 +683,9 @@ class Light extends Api
/*----------------------------------********---------------------------------*/
}
/*----------------------------------********---------------------------------*/
if ($paged === true) {
$response = $response['data'];
}
$result = $this->parserDataUnassigned($response);
return DateTime::convertUtcToIso8601($result, $this->arrayFieldIso8601);