summaryrefslogtreecommitdiff
path: root/app/Model
diff options
context:
space:
mode:
Diffstat (limited to 'app/Model')
-rw-r--r--app/Model/TaskFilter.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/app/Model/TaskFilter.php b/app/Model/TaskFilter.php
index dfd97d9d..8d7bdb44 100644
--- a/app/Model/TaskFilter.php
+++ b/app/Model/TaskFilter.php
@@ -317,7 +317,7 @@ class TaskFilter extends Base
switch ($assignee) {
case 'me':
$this->query->eq(Task::TABLE.'.owner_id', $this->userSession->getId());
- $subtaskQuery->eq(Subtask::TABLE.'user_id',$this->userSession->getId() );
+ $subtaskQuery->eq(Subtask::TABLE.'.user_id',$this->userSession->getId() );
break;
case 'nobody':
$this->query->eq(Task::TABLE.'.owner_id', 0);
@@ -325,8 +325,10 @@ class TaskFilter extends Base
default:
$this->query->ilike(User::TABLE.'.username', '%'.$assignee.'%');
$this->query->ilike(User::TABLE.'.name', '%'.$assignee.'%');
+ $subtaskQuery->beginOr();
$subtaskQuery->ilike(User::TABLE.'.username', '%'.$assignee.'%');
$subtaskQuery->ilike(User::TABLE.'.name', '%'.$assignee.'%');
+ $subtaskQuery->closeOr();
}
if ($assignee != 'nobody'){
$subtasks = $subtaskQuery->findAll();
@@ -776,10 +778,8 @@ class TaskFilter extends Base
User::TABLE.'.name',
User::TABLE.'.username')
->join(User::TABLE, 'id', 'user_id', Subtask::TABLE)
- ->beginOr()
- ->eq(Subtask::TABLE.'.status', Subtask::STATUS_TODO)
- ->eq(Subtask::TABLE.'.status', Subtask::STATUS_INPROGRESS)
- ->closeOr();
+ ->neq(Subtask::TABLE.'.status', Subtask::STATUS_DONE);
+
}
private function addTasksWithFoundSubtask($subtasks) {