<div dir="ltr"><div>Thanks Landon,</div><div> </div><div>That was essentially the issue. </div><div> </div><div>On investigation I found some apparent input validation / sanitization in the RT search function (/opt/rt4/share/html/Search/Build.html) that was not present in the RTIR search functionality that was wrapping custom fields with a ' before passing them to the RT query builder.</div><div> </div><div> if ($keyword =~ s/(['\\])/\\$1/g or $keyword =~ /[^{}\w\.]/) {<br> $keyword = "'$keyword'";<br> }</div><div> </div><div>Patched it into the corresponding RTIR page (ProcessQuery) at the same point in the logic flow, and now the RTIR search works like a charm.</div><div> </div><div>Rich</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 19, 2015 at 4:25 PM, Landon Stewart <span dir="ltr"><<a href="mailto:lstewart@iweb.com" target="_blank">lstewart@iweb.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Mar 19, 2015, at 8:20 AM, Richard Stevens <<a href="mailto:piratefrog@gmail.com">piratefrog@gmail.com</a>> wrote:<br>
> ...<br>
<span>> The end result is:<br>
><br>
> [25773] [Thu Mar 19 14:56:10 2015] [error]: Wrong query, expecting a OPERATOR in 'Queue = 'Incident Reports' AND CF.{Affected >Users}<--here LIKE 'frog'' at /opt/rt4/sbin/../lib/RT/SQL.pm line 130.<br>
><br>
> Has anyone observed this type of behaviour?<br>
<br>
</span>Hi Richard,<br>
<br>
I had this problem just the other day actually. You must enclose CF.{...} in single quotes when ... has a space in it.<br>
<br>
Instead of: CF.{Affected Users}<br>
Do this: 'CF.{Affected Users}'<br>
<br>
Also to see what you are looking at in plain text you can visit the full URL and then change RTIR/Search/Results.html to /Search/Build.html and then click "Advanced" on the top right. The "Query" box will give you the plain text of the search you are performing for any given URL.<br>
<br>
Landon Stewart : <a href="mailto:lstewart@iweb.com">lstewart@iweb.com</a><br>
Lead Specialist, Abuse and Security Management<br>
Spécialiste principal, gestion des abus et sécurité<br>
<a href="http://iweb.com" target="_blank">http://iweb.com</a> : <a href="tel:%2B1%20%28888%29%20909-4932" value="+18889094932">+1 (888) 909-4932</a><br>
</blockquote></div><br></div>