[rt-devel] Logic of RT::Tickets::Limit*?

Jesse Vincent jesse at bestpractical.com
Tue May 21 16:16:52 EDT 2002


I could have sworn that at some point, AND Status != 'Dead' got added
to the SQL generation in Tickets.pm.


On Tue, May 21, 2002 at 04:10:32PM -0400, Rich Lafferty wrote:
> On Tue, May 21, 2002 at 08:42:36PM +0200, Bruce Campbell (bruce_campbell at ripe.net) wrote:
> > 
> > MySQL server logs I'm afraid.
> 
> (I was able to set DBIx::SearchBuilder::DEBUG and get it out that
> way.)
> 
> Eureka! 
> 
> The query is
> 
> SELECT DISTINCT main.* FROM Tickets main WHERE ((main.EffectiveId = main.id))
>    AND ((main.Owner = '2')) ORDER BY main.Created ASC LIMIT 25
> 
> which returns 25 tickets as expected. But 19 of the 25 have a status
> of "dead". Dead tickets are *hidden* in RT, not excluded in the query,
> so since I'm limiting the results to 25, I'm getting 19 dead tickets
> and 4 live ones; when I explicitly ask for new/open/stalled, I'm not
> getting the dead tickets so I get all 9 live ones. 
> 
> I'm inclined to think that that could be done more gracefully,
> although *my* code is content now that I understand why my workaround
> works. Jesse, is that Working As Designed or have I found an
> unintended side-effect?
> 
>   -Rich
> 
> -- 
> Rich Lafferty --------------+-----------------------------------------------
>  Ottawa, Ontario, Canada    |  Save the Pacific Northwest Tree Octopus!
>  http://www.lafferty.ca/    |    http://zapatopi.net/treeoctopus.html
> rich at lafferty.ca -----------+-----------------------------------------------
> 
> _______________________________________________
> rt-devel mailing list
> rt-devel at lists.fsck.com
> http://lists.fsck.com/mailman/listinfo/rt-devel
> 

-- 
http://www.bestpractical.com/products/rt  -- Trouble Ticketing. Free.




More information about the Rt-devel mailing list