[rt-users] WHERE clause when using LimitXXX

Jesse jesse at fsck.com
Wed Aug 1 02:14:40 EDT 2001



On Wed, Aug 01, 2001 at 08:11:12AM +0200, Rafael Corvalan wrote:
> Just because if they are owned by someone, it should not be "new". It
> was just a personal opinion...
> But thinking more in depth, you're probably right. I can "Take" a ticket
> because I know *I* will work on it, but just "Open" it 1 hour later.
> 
> OK, I accept this idea. How can I know (I can do some tests, but I'd
> prefer to have a logical way to know it) what will I obtain using:
> 
> $Tickets->LimitOwner(VALUE => $RT::Nobody->Id);
> $Tickets->LimitStatus(VALUE => "resolved", OPERATOR => "<>");
> $Tickets->LimitStatus(VALUE => "dead", OPERATOR => "<>");
> 
> 
> because of course this doesn't work, since there is a logicl OR between
> the "Status" where clauses, and not an "AND".
> In that case I could inverse and tell Status="new" or "Status"="open"
> or.....


OR you could use ENTRYAGGREGATOR => 'OR' in the LimitStatus statements.
> 
> But am I sure that between the Owner limit and the status limit I am
> using an AND clause?

yes. that's currently built into SearchBuilder.


> 
> -----Original Message-----
> From: Jesse [mailto:jesse at fsck.com] 
> Sent: mercredi, 1. août 2001 07:57
> To: Rafael Corvalan
> Subject: Re: [rt-users] WHERE clause when using LimitXXX
> 
> 
> What I guess I don't understand is why you want to see tickets that are
> owned by someone already and new..
> 
> 
> On Wed, Aug 01, 2001 at 07:52:27AM +0200, Rafael Corvalan wrote:
> > What I had in mind was somewhat different. I was thinking on:
> > 
> > ( Owner = $RT::Nobody->Id AND Status != "resolved" AND Status != 
> > "dead"
> > )
> > OR
> > ( Status = "new" )
> > 
> > 
> > In fact, I created a new element that I display in index.html. This 
> > element should display every ticket that must be taken or open by 
> > someone in the team. This, in english means:
> > 
> > 
> > Tickets not taken (The owner is Nobody) and which status means that 
> > something is still to be done
> > 
> > OR
> > 
> > Tickets taken or not but with Status "new"
> > 
> > 
> > In other words, this element should always be empty. If I see 
> > something in this Element, I should immediately ask myself "Is there a
> 
> > ticket in this element I sould work on"? And if a ticket remains too 
> > much time shown on this element, I should ask to someone in the team 
> > to take it.
> > 
> > 
> > I hope I was clear....
> > 
> > 
> > 
> > -----Original Message-----
> > From: Jesse [mailto:jesse at fsck.com]
> > Sent: mercredi, 1. août 2001 07:20
> > To: Rafael Corvalan
> > Cc: rt-users at fsck.com
> > Subject: Re: [rt-users] WHERE clause when using LimitXXX
> > 
> > 
> > The WHERE Clause is generated by DBIx::SearchBuilder... It isn't as 
> > flexible as hand-hacking raw sequel. this may or may not be a win.  
> > Over time it's been getting more and more flexible and will continue 
> > to do so. at some point, dropping in raw SQL clauses should certainly 
> > be doable.
> > 
> > I can't fully divine what your usage scenario is, but
> > 
> > Limiting to (Status = 'new' OR Status = 'open') AND (Owner = '2' or 
> > Owner = $RT::Nobody->Id) may be what you want.  If not, can you 
> > describe in english what you're trying to query for?
> > 
> >         -j
> > On Wed, Aug 01, 2001 at 12:56:10PM +0800, Rafael Corvalan wrote:
> > > Hi,
> > > How is the WHERE clause constructed when we call 
> > > $Tickets->LimitXXXX?
> > > I know it depends on the field type, so if the field type is a date 
> > > (for example LimitDate method) then "AND" is used. But this 
> > > ENTRYAGGREGATOR is used between fields of the same type only? And
> what
> > 
> > > about fields of different types?
> > > 
> > > For example, how can I create the following filters:
> > > 
> > > 1) Status="new" OR Owner=2
> > > Is the following correct?:  $Tickets->LimitStatus("new");
> > > $Tickets->LimitOwner(2);
> > > 
> > > or a little more complex (but actually, that's what I want):
> > > 
> > > 2) Status="new" OR ( Status="open" AND Owner=2)
> > > 
> > > Thanks
> > > Rafael
> > > --
> > > 
> > > _______________________________________________
> > > FREE Personalized E-mail at Mail.com http://www.mail.com/?sr=signup
> > > 
> > > Talk More, Pay Less with Net2Phone Direct(R), up to 1500 minutes 
> > > free! http://www.net2phone.com/cgi-bin/link.cgi?143
> > > 
> > > 
> > > _______________________________________________
> > > rt-users mailing list
> > > rt-users at lists.fsck.com
> > > http://lists.fsck.com/mailman/listinfo/rt-users
> > > 
> > 
> > --
> > jesse reed vincent -- root at eruditorum.org -- jesse at fsck.com 
> > 70EBAC90: 2A07 FC22 7DB4 42C1 9D71 0108 41A3 3FB3 70EB AC90
> > 
> > that's security the same way that asking for directions to topeka and 
> > being told that a seal is a mammal is informative
> > 					-robin at apocalypse.org
> > 
> 
> -- 
> jesse reed vincent -- root at eruditorum.org -- jesse at fsck.com 
> 70EBAC90: 2A07 FC22 7DB4 42C1 9D71 0108 41A3 3FB3 70EB AC90
> 
> <lamont> I'm reasonably sure that at least two of the electric blue
> kangeroos
>          I saw were real.
> 

-- 
jesse reed vincent -- root at eruditorum.org -- jesse at fsck.com 
70EBAC90: 2A07 FC22 7DB4 42C1 9D71 0108 41A3 3FB3 70EB AC90

T\'waS br|ll1G 4|\||> 7#e sl1T#Y T0v3s D1|> gYR3 4nd Gimb at 1 1|\| 7#E \/\/A83
all |\/|1|\/|53Y W3R3 d4 60r0GR0V3s @|\||> |>4 M0MES wr47H oUTGR4b3.




More information about the rt-users mailing list