Skip to content
Snippets Groups Projects
Commit 1f5694c1 authored by Jared Hancock's avatar Jared Hancock
Browse files

Fix filter issue where negative logic prevents matches

The quickList() method will attempt to ask the database to find filters that
might match the incoming ticket information. The idea is that MySQL is
likely faster than PHP. The problem is that it assumes positive logic is
being utilized.

This patch adds all filters with at least one rule with dn_contain
(does-not-contain) or not_equal (not-equal)
parent fcb0d3da
Branches
Tags
No related merge requests found
......@@ -786,6 +786,9 @@ class TicketFilter {
if($this->vars['subject'])
$sql.=" OR (what='subject' AND LOCATE(val, ".db_input($this->vars['subject']).'))';
# Always include negative-logic rules
$sql.=" OR how IN ('dn_contain', 'not_equal')";
# Also include filters that do not have any rules concerning either
# sender-email-addresses or sender-names or subjects
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment