On 03/27/2013 01:29 PM, Ruslan Zakirov wrote:
On Tue, Mar 26, 2013 at 10:52 PM, Mark Komarinski
<[email protected]> wrote:
On 03/26/2013 02:33 PM, [email protected] wrote:
I think the REST interface can do what you want:
http://requesttracker.wikia.com/wiki/REST
ticket/#/history?format=l looks like it might do what I need. Thanks!
Dirty version using API:
my $ticket = RT::Ticket->new( $RT::SystemUser );
$ticket->Load(1234567890);
my $txns = $ticket->Transactions;
while (my $txn = $txns->Next ) {
print $txn->Content, "\n\n";
}
I did a variation on the REST example:
my $response = $ua->post($uri."ticket/$ticketNumber/history?format=l",
['user' => $access_user, 'pass' => $access_password],
'Content_Type' => 'form-data');
if ($response->is_success) {
print $response->decoded_content;
}
Threw in a sleep between each ticket to keep from overloading the RT
server, and I got everything I needed.
I'll try perl next time around and see if it's any faster.
-Mark
--
Mark Komarinski [email protected]
Manager http://ritg.med.harvard.edu
Research IT Group
Harvard Medical School