[Rt-devel] Bug in Query builder (3.4.5 and 3.6.1)?

Michael Gilbert mdgilb at u.washington.edu
Mon Nov 6 15:29:30 EST 2006


I believe we had this same problem a while back, and the solution 
suggested at 
http://lists.bestpractical.com/pipermail/rt-devel/2005-August/007507.html 
seemed to work fine for us (This may be in 3.6.2rc1, but if an upgrade 
isn't desirable the patch is below).

--- html/Search/Build.html      Thu Aug 25 17:40:12 2005
+++ html/Search/Build.html      Mon Aug 29 21:31:15 2005
@@ -595,6 +595,7 @@
         }
         elsif ( $current & AGGREG ) {
             $ea   = $val;
+            $parentnode->setNodeValue($ea);
             $want = KEYWORD | PAREN;
         }
         elsif ( $current & KEYWORD ) {
@@ -652,7 +653,6 @@

             # explicity add a child to it
             $lastnode = RT::Interface::Web::QueryBuilder::Tree->new( 
$clause, $parentnode );
-            $lastnode->getParent()->setNodeValue($ea);

             ( $ea, $key, $op, $value ) = ( "", "", "", "" );
         }

-michael

Jesse Vincent wrote:

>Can you test out 3.4.6 and 3.6.2rc1?  I believe we dealt with this.
>
>
>On Thu, Nov 02, 2006 at 07:57:18PM -0800, Philip Kime wrote:
>  
>
>>Hmm, but what about this - in the advanced view, I do
>>
>>Queue = 'A' OR ( Status = 'new' AND Subject LIKE 'office')
>>
>>I click apply and it becomes:
>>
>>Queue = 'A' AND ( Status = 'new' AND Subject LIKE 'office')
>>
>>??
>> 
>>
>>-----Original Message-----
>>From: Joby Walker [mailto:joby at u.washington.edu] 
>>Sent: Thursday, November 02, 2006 7:26 PM
>>To: Philip Kime
>>Cc: rt-devel at lists.bestpractical.com
>>Subject: Re: [Rt-devel] Bug in Query builder (3.4.5 and 3.6.1)?
>>
>>This isn't broken, you need to use parenthesis:
>>
>>A,
>>OR (
>>    B,
>>    AND C
>>    )
>>
>>jbw
>>
>>Philip Kime wrote:
>>    
>>
>>>Can anyone reproduce this?
>>> 
>>>Construct a query "A AND B" then change the aggregator to "OR" and add
>>>      
>>>
>>>a condition "C.
>>> 
>>>The original AND changes to an OR. so it becomes "A OR B OR C"
>>> 
>>>Same thing happens if you start with OR and add an AND, you end up 
>>>with "A AND B AND C".
>>> 
>>>Happens in 3.4.5 and 3.6.1
>>> 
>>>The same thing constructed on the command-line with the REST interface
>>>      
>>>
>>>isn't broken and returns the right thing.
>>> 
>>>PK
>>> 
>>>--
>>>Philip Kime
>>>NOPS Systems Architect
>>>310 401 0407
>>> 
>>>
>>>
>>>----------------------------------------------------------------------
>>>--
>>>
>>>_______________________________________________
>>>List info: 
>>>http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-devel
>>>      
>>>
>>_______________________________________________
>>List info: http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-devel
>>
>>    
>>
>
>  
>



More information about the Rt-devel mailing list