diff options
author | Carsten Brachem <carsten.brachem@gmail.com> | 2018-01-12 15:54:12 +0100 |
---|---|---|
committer | fguillot <fred@kanboard.net> | 2018-01-15 10:30:08 -0800 |
commit | 793bbeaaf25345b16cc9a5093e44ba116cd664fe (patch) | |
tree | fd4f4e7b5c14aed9ad9d4aa4ab4e588500ec9c93 /app/Filter/TaskDueDateFilter.php | |
parent | d35d5beee216ea0a092dac88e9b7556faa95372e (diff) |
Allow filtering for tasks without due date
Diffstat (limited to 'app/Filter/TaskDueDateFilter.php')
-rw-r--r-- | app/Filter/TaskDueDateFilter.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/app/Filter/TaskDueDateFilter.php b/app/Filter/TaskDueDateFilter.php index 0de055bf..194dd434 100644 --- a/app/Filter/TaskDueDateFilter.php +++ b/app/Filter/TaskDueDateFilter.php @@ -32,9 +32,13 @@ class TaskDueDateFilter extends BaseDateFilter implements FilterInterface */ public function apply() { - $this->query->neq(TaskModel::TABLE.'.date_due', 0); - $this->query->notNull(TaskModel::TABLE.'.date_due'); - $this->applyDateFilter(TaskModel::TABLE.'.date_due'); + if ($this->value == "none") { + $this->query->eq(TaskModel::TABLE.'.date_due', 0); + } else { + $this->query->neq(TaskModel::TABLE.'.date_due', 0); + $this->query->notNull(TaskModel::TABLE.'.date_due'); + $this->applyDateFilter(TaskModel::TABLE.'.date_due'); + } return $this; } |