summaryrefslogtreecommitdiff
path: root/app/Filter
diff options
context:
space:
mode:
authormkysoft <mkysoft@gmail.com>2019-09-05 00:33:36 +0300
committerFrédéric Guillot <fred@kanboard.net>2019-09-04 20:27:24 -0700
commit93dee80c04a4be2250680473313ec4bc7682ee55 (patch)
tree1ee27cb85f693cf4c40f7e813ed29ead4682ac45 /app/Filter
parentcb2414c99af52e60f4fda7cf809d937d1d6010b2 (diff)
Anybody added for filter
Diffstat (limited to 'app/Filter')
-rw-r--r--app/Filter/TaskAssigneeFilter.php3
-rw-r--r--app/Filter/TaskCreatorFilter.php3
-rw-r--r--app/Filter/TaskSubtaskAssigneeFilter.php3
3 files changed, 9 insertions, 0 deletions
diff --git a/app/Filter/TaskAssigneeFilter.php b/app/Filter/TaskAssigneeFilter.php
index d6962a93..d0e8a9fa 100644
--- a/app/Filter/TaskAssigneeFilter.php
+++ b/app/Filter/TaskAssigneeFilter.php
@@ -64,6 +64,9 @@ class TaskAssigneeFilter extends BaseFilter implements FilterInterface
case 'nobody':
$this->query->eq(TaskModel::TABLE.'.owner_id', 0);
break;
+ case 'anybody':
+ $this->query->gt(TaskModel::TABLE.'.owner_id', 0);
+ break;
default:
$this->query->beginOr();
$this->query->ilike(UserModel::TABLE.'.username', '%'.$this->value.'%');
diff --git a/app/Filter/TaskCreatorFilter.php b/app/Filter/TaskCreatorFilter.php
index 611db189..39bb8ff7 100644
--- a/app/Filter/TaskCreatorFilter.php
+++ b/app/Filter/TaskCreatorFilter.php
@@ -63,6 +63,9 @@ class TaskCreatorFilter extends BaseFilter implements FilterInterface
case 'nobody':
$this->query->eq(TaskModel::TABLE.'.creator_id', 0);
break;
+ case 'anybody':
+ $this->query->gt(TaskModel::TABLE.'.creator_id', 0);
+ break;
default:
$this->query->beginOr();
$this->query->ilike('uc.username', '%'.$this->value.'%');
diff --git a/app/Filter/TaskSubtaskAssigneeFilter.php b/app/Filter/TaskSubtaskAssigneeFilter.php
index 1096bf64..4c5e0f7b 100644
--- a/app/Filter/TaskSubtaskAssigneeFilter.php
+++ b/app/Filter/TaskSubtaskAssigneeFilter.php
@@ -116,6 +116,9 @@ class TaskSubtaskAssigneeFilter extends BaseFilter implements FilterInterface
case 'nobody':
$subquery->eq(SubtaskModel::TABLE.'.user_id', 0);
break;
+ case 'anybody':
+ $subquery->gt(SubtaskModel::TABLE.'.user_id', 0);
+ break;
default:
$subquery->beginOr();
$subquery->ilike(UserModel::TABLE.'.username', $this->value.'%');