summaryrefslogtreecommitdiff
path: root/app/Filter
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2017-05-12 15:55:13 -0400
committerFrederic Guillot <fred@kanboard.net>2017-05-12 15:55:13 -0400
commit5b7e137f769e352e0dddeff6c0c9a19602a8e4d9 (patch)
tree19c38daad18475b623fc713392fc51419a3c029a /app/Filter
parent630f4ee780f3a9240ae9296e73f7518f21ae23ae (diff)
Add wildcard search for task reference field (PR #3119)
Diffstat (limited to 'app/Filter')
-rw-r--r--app/Filter/TaskReferenceFilter.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/Filter/TaskReferenceFilter.php b/app/Filter/TaskReferenceFilter.php
index 27c838f8..d843b777 100644
--- a/app/Filter/TaskReferenceFilter.php
+++ b/app/Filter/TaskReferenceFilter.php
@@ -32,6 +32,11 @@ class TaskReferenceFilter extends BaseFilter implements FilterInterface
*/
public function apply()
{
+ if (strpos($this->value, '*') >= 0) {
+ $this->query->like(TaskModel::TABLE.'.reference', str_replace('*', '%', $this->value));
+ return $this;
+ }
+
$this->query->eq(TaskModel::TABLE.'.reference', $this->value);
return $this;
}