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

Philip Kime pkime at Shopzilla.com
Wed Nov 8 14:35:39 EST 2006


I haven't installed 3.4.6 or 3.6.2rc1 yet but I checked the code in
their Build.html and this patch hasn't been applied to either.

PK



-----Original Message-----
From: Michael Gilbert [mailto:mdgilb at u.washington.edu] 
Sent: Monday, November 06, 2006 12:30 PM
To: Jesse Vincent
Cc: Philip Kime; rt-devel at lists.bestpractical.com
Subject: Re: [Rt-devel] Bug in Query builder (3.4.5 and 3.6.1)?

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.htm
l
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