[rt-users] Find ticket numbers of tickets with large attachments
ruz at bestpractical.com
Wed Jan 16 15:21:15 EST 2013
Attachments.TransactionId = Transactions.id, Transactions.ObjectId =
Tickets.id WHERE Transactions.ObjectType = 'RT::Ticket'.
On Thu, Jan 17, 2013 at 12:08 AM, Remy van Elst <relst at relst.nl> wrote:
> I'm trying to find the ticket numbers of large attachments in my RT
> instance. It is RT 4.0.8 running on Ubuntu 12.04, and I'm the root user
> for this search quest.
> I've constructed the following MySQL query:
> select t.ObjectID,i.Subject from Attachments i LEFT OUTER JOIN
> Transactions t on t.ObjectId = i.id where LENGTH(CONTENT) > 40000;
> which would hopefully return the attachment ticket number.
> I've read on this message:
> "The Attachments:TransactionId column points to a
> Transactions record whose Transactions:ObjectId column contains the
> ticket number."
> but when searching in RT for a ticket number returned by the SQL query
> it gives me a "Ticket does not found" error. Also, after ObjectId 65535
> the returned ObjectID's are displayed as NULL in the query result.
> How can I get the ticket numbers which have attachments larger than 4
> MB? What am I doing wrong, or overlooking?
Best regards, Ruslan.
More information about the rt-users