[Rt-commit] rt branch, 4.0/objecttype-limit, created. rt-4.0.0-170-g5216c94

Alex Vandiver alexmv at bestpractical.com
Thu Apr 28 18:08:09 EDT 2011

The branch, 4.0/objecttype-limit has been created
        at  5216c940773d0452e25db2528be14ea024cf0632 (commit)

- Log -----------------------------------------------------------------
commit 5216c940773d0452e25db2528be14ea024cf0632
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Thu Apr 28 18:02:00 2011 -0400

    Work around RT::Tickets->Limit not actually doing limiting
    Without this, the JoinTransactions called from a RT::Tickets object
    method fails to apply the ObjectType limit.  This is both incorrect, and
    means that the query does not use the appropriate index on Transactions.
    This happens beacause RT::Tickets->Limit does not actual limiting, but
    attempts to transform its arguments to Restrictions, to TicketSQL, to
    actual limits.  Somewhere along the way, the ObjectType gets silently

diff --git a/lib/RT/SearchBuilder.pm b/lib/RT/SearchBuilder.pm
index b4d1698..b652d6d 100644
--- a/lib/RT/SearchBuilder.pm
+++ b/lib/RT/SearchBuilder.pm
@@ -105,9 +105,8 @@ sub JoinTransactions {
         TABLE2 => 'Transactions',
         FIELD2 => 'ObjectId',
-    $self->Limit(
+    $self->RT::SearchBuilder::Limit(
         LEFTJOIN => $alias,
-        ALIAS    => $alias,
         FIELD    => 'ObjectType',
         VALUE    => ref $self->NewItem,


More information about the Rt-commit mailing list