[rt-users] How do you get the SQL that is generated from the ticketSQL
Hamilton Preston
hamiltontpreston at gmail.com
Tue Oct 28 10:56:24 EDT 2014
I am trying to get the SQL that will be sent to the database given some
ticketSQL.
I am not sure what I am doing is the right way to try to do this and
unfortunately it is not working anyway.
Does anyone have some tips?
I tried the following but it gives me an error of:
Can't locate object method "QueryHistory" via package "RT::Tickets"
But looking at this documentation I thought it would work.
https://github.com/bestpractical/rt/blob/stable/lib/RT/Handle.pm
#!/usr/bin/perl
use strict;
use warnings;
use v5.10;
use RT -init;
use RT::Ticket;
my $ticketSQL = "Id='1'";
my $tickets = RT::Tickets->new( RT->SystemUser );
my $validQuery = $tickets->FromSQL($ticketSQL);
say $tickets->QueryHistory();
Thanks
HP
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20141028/1ea664bf/attachment.htm>
More information about the rt-users
mailing list