<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1276" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>This is definitely a bug.. I'm hoping someone can
help narrow down where/how to fix it. I have three tickets in
question. 1269, 1270, and 1271. 1269 and 1270 have been
merged. 1271 talks about 1269 and 1270. The original content of 1269
was simply 'testcandidate1' and 1270 was 'testcandidate2'. If I
search for content like 'testcandidate2' I get no results. I opened 1271
for myself to resolve this bug which contains 'testcandidate2' in it as well, so
searches now show just ticket 1271. The problem is that the SQL string is
limiting to tickets.id = tickets.effectiveid, which will strip out all merged
tickets. d'oh! Here's a simple command line script and its debug
output:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>[snip]</FONT></DIV>
<DIV><FONT face=Arial size=2>my $tickets = new
RT::Tickets($RT::SystemUser);<BR>$tickets->LimitContent(VALUE =>
'testcandidate2', OPERATOR => 'LIKE');<BR>$tickets->DEBUG(1);<BR>while (my
$Ticket = $tickets->Next) {<BR>
print $Ticket->id . "\n";<BR>}<BR>[snip]</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>RT::Tickets=HASH(0x86034d0)->_GenericRestriction
QualifiedField=Attachments_2.Content<BR>RT::Tickets=HASH(0x86034d0)->_GenericRestriction
QualifiedField=main.EffectiveId<BR>RT::Tickets=HASH(0x86034d0)->_GenericRestriction
QualifiedField=main.Type<BR>DBIx::SearchBuilder->DoSearch Query: SELECT
DISTINCT main.* FROM Tickets main, Transactions Transactions_1, Attachments
Attachments_2 WHERE ((main.EffectiveId = main.id)) AND ((main.Type =
'ticket')) AND ( ( ( (Attachments_2.Content LIKE '%testcandidate2%')
) ) ) AND Attachments_2.TransactionId = Transactions_1.id AND
main.id = Transactions_1.Ticket<BR>ID is 1271<BR>1271<BR></FONT></DIV>
<DIV><FONT face=Arial size=2>If i manually remove the 'main.EffectiveId =
main.id' part of the WHERE clause, both 1270 and 1271 show up like they 'should'
(though perhaps it should report 1269 instead of 1270 since 1269's the 'real'
ticket number now.</FONT></DIV>
<DIV><FONT face=Arial size=2>Any ideas on how to fix this?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Thanks!</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> -=| Ben</FONT></DIV>
<DIV><FONT face=Arial size=2> </DIV></FONT></BODY></HTML>