Merged in bugfix/PMCORE-3676 (pull request #8395)

PMCORE-3676

Approved-by: Julio Cesar Laura Avendaño
This commit is contained in:
Paula Quispe
2022-03-03 21:26:56 +00:00
committed by Julio Cesar Laura Avendaño

View File

@@ -102,8 +102,10 @@ class Search extends AbstractCases
}
// Filter by task
if ($this->getTaskId()) {
// Join with delegation
$query->joinDelegation();
if (!$this->getUserId()) {
// Join with delegation if was not defined before
$query->joinDelegation();
}
// Add the filter
$query->task($this->getTaskId());
// Get only the open threads related to the task