Merged in bugfix/PMCORE-952-A (pull request #8174)
PMCORE-952-A Approved-by: Julio Cesar Laura Avendaño
This commit is contained in:
committed by
Julio Cesar Laura Avendaño
commit
e059fb8bc9
@@ -45,6 +45,18 @@ class Task extends Model
|
||||
return $this->hasMany(Delegation::class, 'TAS_ID', 'TAS_ID');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the task by taskId
|
||||
*
|
||||
* @param int $tasId
|
||||
* @return \ProcessMaker\Model\Task
|
||||
*/
|
||||
public static function getTask($tasId)
|
||||
{
|
||||
$query = Task::query()->select()->where('TAS_ID', $tasId);
|
||||
return $query->first();
|
||||
}
|
||||
|
||||
/**
|
||||
* Scope a query to only include self-service
|
||||
*
|
||||
@@ -98,7 +110,7 @@ class Task extends Model
|
||||
public function scopeExcludedTasks($query)
|
||||
{
|
||||
$query->whereNotIn('TAS_TYPE', Task::$typesRunAutomatically)
|
||||
->whereNotIn('TAS_TYPE', Task::DUMMY_TASKS);
|
||||
->whereNotIn('TAS_TYPE', Task::DUMMY_TASKS);
|
||||
|
||||
return $query;
|
||||
}
|
||||
@@ -256,7 +268,7 @@ class Task extends Model
|
||||
});
|
||||
|
||||
$res = $query->first();
|
||||
if(is_null($res)) {
|
||||
if (is_null($res)) {
|
||||
return "";
|
||||
} else {
|
||||
return $res->TAS_DEF_TITLE;
|
||||
|
||||
Reference in New Issue
Block a user