We have some very old tickets that contain attachments that I would like to purge. First, I would like to get a list of these to review before actually purging them from the db. Secondly, will someone please provide the syntax for doing this using rtx-shredder?
Update on this. I found some old posts and I am trying to use the following command to display tickets by size:
mysql -u root -p -hlocalhost rt3 -e’select length(A.Content), A.id, T.Ticket fromAttachments A, Transactions T where A.TransactionId = T.id order by 1’
it returns:
“ERROR 1054 (42S22) at line 1: Unknown column ‘T.Ticket’ in ‘field list’”
I am running RT 3.6.5. Can help would be greatly appreciated!
Your code doesn't make any sense to me. You use "A" for the Attachments
table and “T” for the Transactions table. But when you refer to the
field in your code you wrote “T.Ticket”. There is no “Ticket” field on
the Transaction table. That’s probably why you got the error.
My DataDictionary describes the “Type” field as “containing what the
transaction is for (i.e. to change a field on a ticket, the “type” would
be “set”)”. “ObjectID” is described as “the ID of the record the
transaction is referring to”. “ObjectType” is described as “Describes
the class of record to which the transaction refers (most often
�Ticket�)”. Your code should probably refer to these three fields as
“T.ObjectType = ‘Ticket’ and T.ObjectID = A.Id and T.Type = (the type of
transaction attachment you’re looking for i.e. t"create” or “set” or
whatever). Hope this helps.
Update on this. I found some old posts and I am trying to use the following command to display tickets by size:
mysql -u root -p -hlocalhost rt3 -e’select length(A.Content), A.id, T.Ticket fromAttachments A, Transactions T where A.TransactionId = T.id order by 1’
it returns:
“ERROR 1054 (42S22) at line 1: Unknown column ‘T.Ticket’ in ‘field list’”
I am running RT 3.6.5. Can help would be greatly appreciated!
Your code doesn't make any sense to me. You use "A" for the Attachments
table and “T” for the Transactions table. But when you refer to the
field in your code you wrote “T.Ticket”. There is no “Ticket” field on
the Transaction table. That’s probably why you got the error.
Ticket was there for a long time until 3.4 (I think or even 3.2)
version, when transactions were only for tickets. Now, other records
may have transactions too.
My DataDictionary describes the "Type" field as "containing what the
transaction is for (i.e. to change a field on a ticket, the “type” would
be “set”)". “ObjectID” is described as “the ID of the record the
transaction is referring to”. “ObjectType” is described as “Describes
the class of record to which the transaction refers (most often
“Ticket”)”. Your code should probably refer to these three fields as
“T.ObjectType = ‘Ticket’ and T.ObjectID = A.Id and T.Type = (the type of
transaction attachment you’re looking for i.e. t"create” or “set” or
whatever). Hope this helps.
Kenn
LBNL
Update on this. I found some old posts and I am trying to use the following command to display tickets by size:
mysql -u root -p -hlocalhost rt3 -e’select length(A.Content), A.id, T.Ticket fromAttachments A, Transactions T where A.TransactionId = T.id order by 1’
it returns:
“ERROR 1054 (42S22) at line 1: Unknown column ‘T.Ticket’ in ‘field list’”
I am running RT 3.6.5. Can help would be greatly appreciated!