Add wildcard search for task reference field (PR #3119)

This commit is contained in:
Frederic Guillot
2017-05-12 15:55:13 -04:00
parent 630f4ee780
commit 5b7e137f76
5 changed files with 73 additions and 0 deletions

View File

@@ -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;
}