[rt-users] Find ticket numbers of tickets with large attachments
Remy van Elst
relst at relst.nl
Wed Jan 16 15:08:48 EST 2013
Hello,
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:
http://lists.bestpractical.com/pipermail/rt-users/2007-June/046395.html
"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?
Sincerely,
More information about the rt-users
mailing list