use FS::UID qw(dbh);
use FS::CGI qw(popurl);
use FS::TicketSystem::RT_Libs;
-use RT::CurrentUser;
@ISA = qw( FS::TicketSystem::RT_Libs );
$me = '[FS::TicketSystem::RT_Internal]';
sub sql_num_customer_tickets {
- "( select count(*) from tickets
- join links on ( tickets.id = links.localbase )
- where ( status = 'new' or status = 'open' or status = 'stalled' )
- and target = 'freeside://freeside/cust_main/' || custnum
+ "( select count(*) from Tickets
+ join Links on ( Tickets.id = Links.LocalBase )
+ where ( Status = 'new' or Status = 'open' or Status = 'stalled' )
+ and Target = 'freeside://freeside/cust_main/' || custnum
)";
}
Ticket message
+=item mime_type
+
+MIME type to use for message. Defaults to text/plain. Specifying text/html
+can be useful to use HTML markup in message.
+
=item custnum
Customer number (see L<FS::cust_main>) to associate with ticket.
my $mimeobj = MIME::Entity->build(
'Data' => $param{'message'},
- 'Type' => 'text/plain',
+ 'Type' => ( $param{'mime_type'} || 'text/plain' ),
);
my %ticket = (
my $user = $FS::CurrentUser::CurrentUser->username;
+ eval 'use RT::CurrentUser;';
+ die $@ if $@;
+
$session ||= {};
$session->{'CurrentUser'} = RT::CurrentUser->new();