[rt-users] 'Show Results' link / Query Builder occasionally not working properly

Ruslan Zakirov ruz at bestpractical.com
Tue Oct 19 08:04:57 EDT 2010


Hi,

Issue has been fixed.

Patch:
diff --git a/lib/RT/SQL.pm b/lib/RT/SQL.pm
index 799cf94..946a8ab 100644
--- a/lib/RT/SQL.pm
+++ b/lib/RT/SQL.pm
@@ -68,7 +68,7 @@ my @tokens = qw[VALUE AGGREGATOR OPERATOR OPEN_PAREN
CLOSE_PAREN KEYWORD];
 use Regexp::Common qw /delimited/;
 my $re_aggreg      = qr[(?i:AND|OR)];
 my $re_delim       = qr[$RE{delimited}{-delim=>qq{\'\"}}];
-my $re_value       = qr[\d+|NULL|$re_delim];
+my $re_value       = qr[[+-]?\d+|NULL|$re_delim];
 my $re_keyword     = qr[[{}\w\.]+|$re_delim];
 my $re_op          = qr[=|!=|>=|<=|>|<|(?i:IS NOT)|(?i:IS)|(?i:NOT
LIKE)|(?i:LIKE)]; # long to short
 my $re_open_paren  = qr[\(];


SHA: 6c44641cd50c4f3ad631f4cb22292bb37a3c6c97

On Fri, Oct 15, 2010 at 3:51 AM, Stuart Browne
<stuart.browne at ausregistry.com.au> wrote:
> Hi,
>
> Running RT 3.8.8 / DBIx::SearchBuilder 1.56, and have noticed some strange behaviour with the 'Show Results' link and the Query Builder.
>
> From the 'At A Glance' page, I generally click on 'xx highest priority tickets I own' to bring up the search result, then click 'Edit Search' and add 'Priority > -2' to show only positive value priority tickets.  Thus far, all is fine (and I understand I can just alter the saved search, but that's not what I want).
>
> From there, I use the list, going into and out of tickets, sometimes navigating into Configuration or other areas, then click back on 'Tickets' and 'Show Results'.  For whatever reason, the search is modified to be 'Priority > 2'.
>
> Steps to reproduce, and what is shown on the screen:
>
>        1. Log In
>        2. Click on 'xx highest priority tickets I own'
>        3. Click on 'Edit Search'
>        4. Use dropdown boxes to add 'Priority' 'greater than' '-2', clicked 'Add these items' (or '... and Search')
>                - At this point, the query is as follows:
>                        Owner = '__CurrentUser__' AND (  Status = 'new' OR Status = 'open'
>                                OR Status = 'validating' OR Status = 'WaitExt' ) AND
>                                Queue != 'Holding' AND Priority > '-2'
>        5. Click on any other left-hand menu item
>        6. Click on 'Tickets'
>                - Query shown is correct with the '-2' Priority
>        7. Click on 'Show Results'
>
> At this point, the query has changed to:
>
>        Owner = '__CurrentUser__' AND (  Status = 'new' OR Status = 'open'
>                OR Status = 'validating' OR Status = 'WaitExt' ) AND
>                Queue != 'Holding' AND Priority > 2
>
> If at step 4, you press 'Add these items' 3 times, it also removes the negative.
>
> I'm not good enough at the internals of the query builder to know why the state of this field changes 'magically', but it didn't happen in prior versions.
>
> Has anybody else seen this, or can they reproduce the issue? ;)
>
> Stuart J. Browne
> Senior Unix Administrator, Network Administrator
> AusRegistry Pty Ltd
> Level 8, 10 Queens Road
> Melbourne. Victoria. Australia. 3004.
> Ph:  +61 3 9866 3710
> Fax: +61 3 9866 1970
> Email: stuart.browne at ausregistry.com.au
> Web: www.ausregistry.com.au
>
> The information contained in this communication is intended for the named recipients only. It is subject to copyright and may contain legally privileged and confidential information and if you are not an intended recipient you must not use, copy, distribute or take any action in reliance on it. If you have received this communication in error, please delete all copies from your system and notify us immediately.
>
>
>
> RT Training in Washington DC, USA on Oct 25 & 26 2010
> Last one this year -- Learn how to get the most out of RT!
>



-- 
Best regards, Ruslan.



More information about the rt-users mailing list